From: nishi Date: Fri, 7 Jun 2024 09:23:55 +0000 (+0000) Subject: add pkgbuild X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=06689fdf65e324ee237475af5850b3856c728ca1;p=dataworks.git add pkgbuild git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@170 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 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 +} diff --git a/common.mk b/common.mk index 3405fad..4f59ab8 100644 --- 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 "}" >> $@