diff options
author | Dringsim | 2023-09-05 23:05:25 +0800 |
---|---|---|
committer | Dringsim | 2023-09-05 23:05:25 +0800 |
commit | 5e33d137159b2eea3dfca5200434cb433f62bfd1 (patch) | |
tree | d1d417f61e19e0c5ada3e8da2b4f60ecbaf6d541 | |
download | aur-5e33d137159b2eea3dfca5200434cb433f62bfd1.tar.gz |
create package
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | makefile.patch | 35 |
3 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..12af4af23f19 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = clips-lib + pkgdesc = A forward-chaining rule-based programming language written in C that also provides procedural and object-oriented programming facilities (with headers and libclips.so) + pkgver = 6.41 + pkgrel = 1 + url = https://www.clipsrules.net/ + arch = x86_64 + license = GPL + depends = termcap + depends = libxaw + depends = xbitmaps + provides = clips + conflicts = clips + source = https://downloads.sourceforge.net/project/clipsrules/CLIPS/6.4.1/clips_core_source_641.tar.gz + source = https://downloads.sourceforge.net/project/clipsrules/CLIPS/6.4.1/clips_documentation_641.tar.gz + source = https://downloads.sourceforge.net/project/clipsrules/CLIPS/6.4.1/clips_examples_641.tar.gz + source = https://downloads.sourceforge.net/project/clipsrules/CLIPS/6.4.1/clips_feature_tests_641.tar.gz + source = makefile.patch + sha256sums = AA4F3BB8B15964BF4734F365C9587E32996BDDD3F50BFCF53B95154BEAE76EE3 + sha256sums = 367ED086ADBCD805CF31AB3FC8A8CE7E5B92D022F1DA5D49EB86011B402A7C68 + sha256sums = BBA83B6E38F671D4112C859F3007535B100610236E2DA26412798BBEF65A62FA + sha256sums = 4AF5B8835B1881FAF72C28C4D57252974077D6AA290598EB8E541A4F17D550FF + sha256sums = 6E08E30FA96AF3D87F9E20768AA3E045A87EF9784F8E2A845FB6D8D849CE0A72 + +pkgname = clips-lib diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..35a888eab347 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Dringsim <dringsim@qq.com> + +pkgname=clips-lib +_pkgname=clips +pkgver=6.41 +_pkgver=6.4.1 +pkgrel=1 +pkgdesc="A forward-chaining rule-based programming language written in C that also provides procedural and object-oriented programming facilities (with headers and libclips.so)" +arch=('x86_64') +url="https://www.clipsrules.net/" +license=('GPL') +depends=('termcap' 'libxaw' 'xbitmaps') +provides=('clips') +conflicts=('clips') +source=("https://downloads.sourceforge.net/project/clipsrules/CLIPS/${_pkgver}/${_pkgname}_core_source_${pkgver//.}.tar.gz" + "https://downloads.sourceforge.net/project/clipsrules/CLIPS/${_pkgver}/${_pkgname}_documentation_${pkgver//.}.tar.gz" + "https://downloads.sourceforge.net/project/clipsrules/CLIPS/${_pkgver}/${_pkgname}_examples_${pkgver//.}.tar.gz" + "https://downloads.sourceforge.net/project/clipsrules/CLIPS/${_pkgver}/${_pkgname}_feature_tests_${pkgver//.}.tar.gz" + "makefile.patch") +sha256sums=('AA4F3BB8B15964BF4734F365C9587E32996BDDD3F50BFCF53B95154BEAE76EE3' + '367ED086ADBCD805CF31AB3FC8A8CE7E5B92D022F1DA5D49EB86011B402A7C68' + 'BBA83B6E38F671D4112C859F3007535B100610236E2DA26412798BBEF65A62FA' + '4AF5B8835B1881FAF72C28C4D57252974077D6AA290598EB8E541A4F17D550FF' + '6E08E30FA96AF3D87F9E20768AA3E045A87EF9784F8E2A845FB6D8D849CE0A72') + +build() { + cd "${_pkgname}_core_source_${pkgver//.}/core" + patch --forward --strip=1 --input="${srcdir}/makefile.patch" + make +} + +package() { + install -Dm755 ${_pkgname}_core_source_${pkgver//.}/core/clips ${pkgdir}/usr/bin/clips + install -Dm644 ${_pkgname}_core_source_${pkgver//.}/core/*.h -t ${pkgdir}/usr/include/${_pkgname} + # ln -sf /usr/include/${_pkgname}/clips.h ${pkgdir}/usr/include/clips.h + install -Dm644 ${_pkgname}_core_source_${pkgver//.}/core/libclips.so ${pkgdir}/usr/lib/libclips.so.${pkgver} + ln -sf /usr/lib/libclips.so.${pkgver} ${pkgdir}/usr/lib/libclips.so.6 + ln -sf /usr/lib/libclips.so.${pkgver} ${pkgdir}/usr/lib/libclips.so + install -d "${pkgdir}/usr/share/${_pkgname}" + install -d "${pkgdir}/usr/share/doc/${_pkgname}/pdf" + cp ${_pkgname}_documentation_${pkgver//.}/*.pdf ${pkgdir}/usr/share/doc/${_pkgname}/pdf/ + cp -a ${_pkgname}_examples_${pkgver//.} ${pkgdir}/usr/share/${_pkgname}/examples + cp -a ${_pkgname}_feature_tests_${pkgver//.} ${pkgdir}/usr/share/${_pkgname}/feature_tests +} diff --git a/makefile.patch b/makefile.patch new file mode 100644 index 000000000000..5195d13acdb8 --- /dev/null +++ b/makefile.patch @@ -0,0 +1,35 @@ +diff --color --unified --recursive --text orig/makefile new/makefile +--- orig/makefile 2023-09-05 17:39:25.052991572 +0800 ++++ new/makefile 2023-09-05 18:05:25.982563603 +0800 +@@ -67,7 +67,7 @@ + debug : clips + + release : CC = gcc +-release : CFLAGS = -std=c99 -O3 -fno-strict-aliasing ++release : CFLAGS = -std=c99 -O3 -fno-strict-aliasing -fPIC + release : LDLIBS = -lm + release : clips + +@@ -90,16 +90,16 @@ + .c.o : + $(CC) -c -D$(CLIPS_OS) $(CFLAGS) $(WARNINGS) $< + +-clips : main.o libclips.a +- $(CC) -o clips main.o -L. -lclips $(LDLIBS) ++clips : main.o libclips.so ++ $(CC) -o clips main.o -L. -lclips $(LDFLAGS) + +-libclips.a : $(OBJS) +- rm -f $@ +- ar cq $@ $(OBJS) ++libclips.so : $(OBJS) ++ rm -f $@ ++ $(CC) -fPIC -shared -o libclips.so $(OBJS) $(LDLIBS) $(LDFLAGS) + + clean : + -rm -f main.o $(OBJS) +- -rm -f clips libclips.a ++ -rm -f clips libclips.so + + .PHONY : all clips clean debug release debug_cpp release_cpp + |