From: nishi Date: Mon, 17 Jun 2024 00:07:01 +0000 (+0000) Subject: add package-related stuff X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=6ef90b0bb43221eb30fb948818211bea1796da33;p=dataworks.git add package-related stuff git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@316 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Makefiles/common-decl.mk b/Makefiles/common-decl.mk index f045ba8..f142967 100644 --- a/Makefiles/common-decl.mk +++ b/Makefiles/common-decl.mk @@ -1,4 +1,4 @@ -# $Id: common-decl.mk 302 2024-06-14 12:23:13Z nishi $ +# $Id$ CC = cc SHCC = cc diff --git a/Makefiles/common.mk b/Makefiles/common.mk index 4b38fae..b66595d 100644 --- a/Makefiles/common.mk +++ b/Makefiles/common.mk @@ -1,4 +1,4 @@ -# $Id: common.mk 312 2024-06-15 02:13:12Z nishi $ +# $Id$ .PHONY: all no-doc replace format clean ./Library ./Client ./Document ./Server ./Grammar ./RemoteClient ./Installer ./Tool get-version thanks-banner dos-installer diff --git a/Makefiles/deb.mk b/Makefiles/deb.mk new file mode 100644 index 0000000..3bf1eb0 --- /dev/null +++ b/Makefiles/deb.mk @@ -0,0 +1,3 @@ +# $Id$ + +.PHONY: ./Package/dataworks.deb diff --git a/Makefiles/dosbox.mk b/Makefiles/dosbox.mk index 2f669ba..2d5cd49 100644 --- a/Makefiles/dosbox.mk +++ b/Makefiles/dosbox.mk @@ -1,4 +1,4 @@ -# $Id: common.mk 312 2024-06-15 02:13:12Z nishi $ +# $Id$ .PHONY: dosbox prepare-dosbox dosbox-x cleanup-dosbox diff --git a/Makefiles/package.mk b/Makefiles/package.mk index de40e49..187d2cd 100644 --- a/Makefiles/package.mk +++ b/Makefiles/package.mk @@ -1,37 +1,4 @@ -# $Id: common.mk 312 2024-06-15 02:13:12Z nishi $ +# $Id$ -.PHONY: ./Package/PKGBUILD - -./Package/PKGBUILD: - echo "# \$$Id\$$" > $@ - echo >> $@ - echo "pkgname='dataworks'" >> $@ - echo "pkgver='"$(VERSION)"'" >> $@ - echo "pkgdesc='Database System'" >> $@ - echo "arch=('i686' 'x86_64')" >> $@ - echo "license=('BSD')" >> $@ - echo "pkgrel='`cat ./Package/increment-PKGBUILD`'" >> $@ - echo "makedepends=('byacc')" >> $@ - echo "source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision="`svn info -r HEAD | grep "Revision" | grep -Eo "[0-9]+" | xargs expr 1 +`"')" >> $@ - echo "sha256sums=('SKIP')" >> $@ - echo >> $@ - echo "build() {" >> $@ - echo " cd dataworks" >> $@ - echo " make clean" >> $@ - 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 "}" >> $@ - expr `cat ./Package/increment-PKGBUILD` + 1 > ./Package/increment-PKGBUILD +include Makefiles/pkgbuild.mk +include Makefiles/deb.mk diff --git a/Makefiles/pkgbuild.mk b/Makefiles/pkgbuild.mk new file mode 100644 index 0000000..920db32 --- /dev/null +++ b/Makefiles/pkgbuild.mk @@ -0,0 +1,37 @@ +# $Id$ + +.PHONY: ./Package/PKGBUILD + +./Package/PKGBUILD: + echo "# \$$Id\$$" > $@ + echo >> $@ + echo "pkgname='dataworks'" >> $@ + echo "pkgver='"$(VERSION)"'" >> $@ + echo "pkgdesc='Database System'" >> $@ + echo "arch=('i686' 'x86_64')" >> $@ + echo "license=('BSD')" >> $@ + echo "pkgrel='`cat ./Package/increment-PKGBUILD`'" >> $@ + echo "makedepends=('byacc')" >> $@ + echo "source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision="`svn info -r HEAD | grep "Revision" | grep -Eo "[0-9]+" | xargs expr 1 +`"')" >> $@ + echo "sha256sums=('SKIP')" >> $@ + echo >> $@ + echo "build() {" >> $@ + echo " cd dataworks" >> $@ + echo " make clean" >> $@ + 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 "}" >> $@ + expr `cat ./Package/increment-PKGBUILD` + 1 > ./Package/increment-PKGBUILD