]> Nishi Git Mirror - dataworks.git/commitdiff
add pkgbuild
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Fri, 7 Jun 2024 09:23:55 +0000 (09:23 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Fri, 7 Jun 2024 09:23:55 +0000 (09:23 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@170 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

PKGBUILD [new file with mode: 0644]
common.mk

diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644 (file)
index 0000000..dde6f99
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id$
+
+pkgname='dataworks'
+pkgver='0.1.0'
+pkgdesc='Database System'
+arch=('i686' 'x86_64')
+license=('BSD')
+pkgrel='1'
+makedepends=('byacc')
+source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision=169')
+sha256sums=('SKIP')
+
+build() {
+       cd dataworks
+       make no-doc YACC=byacc
+}
+
+package() {
+       cd dataworks
+       mkdir -p $pkgdir/usr/include
+       mkdir -p $pkgdir/usr/lib
+       mkdir -p $pkgdir/usr/bin
+       cp -rf Library/*.h $pkgdir/usr/include/
+       cp -rf Library/*.a $pkgdir/usr/lib/
+       cp -rf Library/*.so $pkgdir/usr/lib/
+       cp -rf Server/dataworks_server $pkgdir/usr/bin/
+       cp -rf Client/dataworks $pkgdir/usr/bin/
+       ln -sf dataworks_server $pkgdir/usr/bin/dwserv
+       ln -sf dataworks $pkgdir/usr/bin/dw
+}
index 3405fad238bbc6af4768002e689510cb353d7fb9..4f59ab8b5711156dfe4b6ba75c4c873a18239f3f 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -35,7 +35,7 @@ format:
        clang-format -i $(FILES)
 
 clean:
-       rm -f *.zip *.tar.gz
+       rm -f *.zip *.tar.gz PKGBUILD
        $(MAKE) -C ./Grammar clean $(COMPILE_FLAGS)
        $(MAKE) -C ./Library clean $(COMPILE_FLAGS)
        $(MAKE) -C ./Client clean $(COMPILE_FLAGS)
@@ -115,3 +115,35 @@ dosbox-x: prepare-dosbox
 
 cleanup-dosbox:
        rm -f op.txt dosbox.conf DW.* DWSERV.* dw.* dwserv.* dosbox.core
+
+./PKGBUILD:
+       echo "# \$$Id\$$" > $@
+       echo >> $@
+       echo "pkgname='dataworks'" >> $@
+       echo "pkgver='"`cat Library/dataworks.c | grep " dataworks_version " | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?'`"'" >> $@
+       echo "pkgdesc='Database System'" >> $@
+       echo "arch=('i686' 'x86_64')" >> $@
+       echo "license=('BSD')" >> $@
+       echo "pkgrel='1'" >> $@
+       echo "makedepends=('byacc')" >> $@
+       echo "source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision="`svn info | grep "Revision" | grep -Eo "[0-9]+"`"')" >> $@
+       echo "sha256sums=('SKIP')" >> $@
+       echo >> $@
+       echo "build() {" >> $@
+       echo "  cd dataworks" >> $@
+       echo "  make no-doc YACC=byacc" >> $@
+       echo "}" >> $@
+       echo >> $@
+       echo "package() {" >> $@
+       echo "  cd dataworks" >> $@
+       echo "  mkdir -p \$$pkgdir/usr/include" >> $@
+       echo "  mkdir -p \$$pkgdir/usr/lib" >> $@
+       echo "  mkdir -p \$$pkgdir/usr/bin" >> $@
+       echo "  cp -rf Library/*.h \$$pkgdir/usr/include/" >> $@
+       echo "  cp -rf Library/*.a \$$pkgdir/usr/lib/" >> $@
+       echo "  cp -rf Library/*.so \$$pkgdir/usr/lib/" >> $@
+       echo "  cp -rf Server/dataworks_server \$$pkgdir/usr/bin/" >> $@
+       echo "  cp -rf Client/dataworks \$$pkgdir/usr/bin/" >> $@
+       echo "  ln -sf dataworks_server \$$pkgdir/usr/bin/dwserv" >> $@
+       echo "  ln -sf dataworks \$$pkgdir/usr/bin/dw" >> $@
+       echo "}" >> $@