From 6ef90b0bb43221eb30fb948818211bea1796da33 Mon Sep 17 00:00:00 2001 From: nishi Date: Mon, 17 Jun 2024 00:07:01 +0000 Subject: [PATCH] add package-related stuff git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@316 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- Makefiles/common-decl.mk | 2 +- Makefiles/common.mk | 2 +- Makefiles/deb.mk | 3 +++ Makefiles/dosbox.mk | 2 +- Makefiles/package.mk | 39 +++------------------------------------ Makefiles/pkgbuild.mk | 37 +++++++++++++++++++++++++++++++++++++ 6 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 Makefiles/deb.mk create mode 100644 Makefiles/pkgbuild.mk 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 -- 2.43.0