summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaichi Shinozaki2015-06-09 18:16:39 +0900
committerDaichi Shinozaki2015-06-09 18:16:39 +0900
commit0daffa517fd51a585283d5cf1443588a109beaee (patch)
tree7fa64c4bf70854748ef96fd377a9144e0c6fe827
downloadaur-0daffa517fd51a585283d5cf1443588a109beaee.tar.gz
Initial import
-rw-r--r--.SRCINFO29
-rw-r--r--Makefile.patch11
-rw-r--r--PKGBUILD56
-rw-r--r--gpsshogi.install7
-rw-r--r--gpsshogi.profile1
-rw-r--r--makefile.conf.patch8
6 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d1e2b48f8092
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = gpsshogi-svn
+ pkgdesc = Shogi (Japanese chess) playing program based on OpenShogiLib
+ pkgver = r2925
+ pkgrel = 2
+ url = http://gps.tanaka.ecc.u-tokyo.ac.jp/gpsshogi/index.php?GPSShogiEn
+ install = gpsshogi.install
+ arch = i686
+ arch = x86_64
+ groups = lib
+ license = custom
+ makedepends = chrpath
+ makedepends = boost
+ makedepends = qtchooser
+ depends = libosl-svn
+ depends = gsl
+ depends = poco
+ depends = qt4
+ depends = boost-libs
+ source = gpsshogi.tar.gz::http://gps.tanaka.ecc.u-tokyo.ac.jp/cgi-bin/viewvc.cgi/trunk/gpsshogi/?root=gpsshogi&view=tar
+ source = makefile.conf.patch
+ source = gpsshogi.profile
+ source = Makefile.patch
+ md5sums = SKIP
+ md5sums = 539c37dcf4feb57b24ce2c155856f4e8
+ md5sums = 3bafa7d5464e856bca8b3e801e3a8617
+ md5sums = 3963a545156ea613d5371d0f38b1ca1b
+
+pkgname = gpsshogi-svn
+
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 000000000000..7d145fc9e7d5
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile.orig 2009-06-20 22:31:42.000000000 +0900
++++ Makefile 2014-04-30 16:09:39.499061070 +0900
+@@ -26,7 +26,7 @@
+ cd lib; $(MAKE) clean
+
+ update-revision:
+- cat $(GPSSHOGI_REVISION_H) | sed -e 's/r[0-9][0-9A-Z:]*/r'`svnversion`'/g' > $(GPSSHOGI_REVISION_H).new
++ cat $(GPSSHOGI_REVISION_H) | sed -e 's/r[0-9][0-9A-Z:]*/%%revision/g' > $(GPSSHOGI_REVISION_H).new
+ if cmp $(GPSSHOGI_REVISION_H) $(GPSSHOGI_REVISION_H).new > /dev/null; then \
+ rm $(GPSSHOGI_REVISION_H).new; \
+ else \
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4841f313371b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Daichi Shinozaki <dsdseg@gmail.com>
+pkgname=gpsshogi-svn
+pkgver=r2925
+pkgrel=2
+pkgdesc="Shogi (Japanese chess) playing program based on OpenShogiLib"
+arch=('i686' 'x86_64')
+url='http://gps.tanaka.ecc.u-tokyo.ac.jp/gpsshogi/index.php?GPSShogiEn'
+license=('custom')
+groups=('lib')
+depends=('libosl-svn' 'gsl' 'poco' 'qt4' 'boost-libs')
+makedepends=('chrpath' 'boost' 'qtchooser')
+install='gpsshogi.install'
+source=("gpsshogi.tar.gz::http://gps.tanaka.ecc.u-tokyo.ac.jp/cgi-bin/viewvc.cgi/trunk/gpsshogi/?root=gpsshogi&view=tar"
+'makefile.conf.patch'
+'gpsshogi.profile'
+'Makefile.patch'
+)
+md5sums=('SKIP'
+ '539c37dcf4feb57b24ce2c155856f4e8'
+ '3bafa7d5464e856bca8b3e801e3a8617'
+ '3963a545156ea613d5371d0f38b1ca1b')
+
+pkgver() {
+ curl -s "http://gps.tanaka.ecc.u-tokyo.ac.jp/cgi-bin/viewvc.cgi/trunk/gpsshogi/?root=gpsshogi" |\
+ sed -n -e 's/^.*Revision \([0-9]*\).*$/r\1/p'
+}
+
+prepare() {
+ cd "$srcdir"/${pkgname%-svn}
+ patch --verbose -i $srcdir/makefile.conf.patch
+ patch --verbose -i $srcdir/Makefile.patch
+ sed -i -e "s/%%revision/$pkgver/" $srcdir/gpsshogi/Makefile
+}
+
+build() {
+ cd "$srcdir"/gpsshogi/
+ QT_SELECT=4 make viewer-release
+ cd ./release
+ make
+ cd ../sample/gpsshell
+ make
+}
+
+package() {
+ install -Dm644 $srcdir/gpsshogi/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm755 $srcdir/gpsshogi.profile ${pkgdir}/etc/profile.d/gpsshogi.sh
+ install -Dm644 $srcdir/gpsshogi/makefile.conf $pkgdir/usr/share/gpsshogi/makefile.conf
+ mkdir -m755 -p $pkgdir/usr/{bin,include}
+ cp -r $srcdir/gpsshogi/data "$pkgdir"/usr/share/gpsshogi/
+ rm -f $srcdir/gpsshogi/include/gpsshogi/revision.h.new
+ cp -r $srcdir/gpsshogi/include/gpsshogi "$pkgdir"/usr/include/
+ install -m755 $srcdir/gpsshogi/release/{alphabetastat,gps{usi,shogi}} "$pkgdir"/usr/bin/
+ chrpath --delete $srcdir/gpsshogi/sample/viewer/viewer
+ install -m755 $srcdir/gpsshogi/sample/viewer/viewer "$pkgdir"/usr/bin/gpsshogi-viewer
+ install -m755 $srcdir/gpsshogi/sample/gpsshell/gpsshell "$pkgdir"/usr/bin/
+}
diff --git a/gpsshogi.install b/gpsshogi.install
new file mode 100644
index 000000000000..e5e0466f1125
--- /dev/null
+++ b/gpsshogi.install
@@ -0,0 +1,7 @@
+post_install() {
+ echo -n '>> Setting $GPSSHOGI_HOME/makefile.conf ...'
+ sed -i 's!^\(GPSSHOGI_REVISION_H = \)\(.*\)!\1/usr/include/gpsshogi/revision.h!' /usr/share/gpsshogi/makefile.conf
+ echo " done"
+ echo
+ echo 'Please relogin for the changes to GPSSHOGI_HOME environment variable to take effect.'
+}
diff --git a/gpsshogi.profile b/gpsshogi.profile
new file mode 100644
index 000000000000..5001e79e9e65
--- /dev/null
+++ b/gpsshogi.profile
@@ -0,0 +1 @@
+export GPSSHOGI_HOME=/usr/share/gpsshogi
diff --git a/makefile.conf.patch b/makefile.conf.patch
new file mode 100644
index 000000000000..0f36ac5d8d3f
--- /dev/null
+++ b/makefile.conf.patch
@@ -0,0 +1,8 @@
+--- makefile.conf 2014-04-04 18:39:10.000000000 +0900
++++ makefile.conf.orig 2014-04-22 11:17:04.444834035 +0900
+@@ -1,4 +1,4 @@
+-OSL_HOME = $(GPSSHOGI_HOME)/../osl
++#OSL_HOME = $(GPSSHOGI_HOME)/../osl
+ -include $(GPSSHOGI_HOME)/makefile.local
+ -include $(OSL_HOME)/makefile.local
+ USE_GCH = 0