mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 06:57:16 +08:00
78 lines
2.1 KiB
Bash
78 lines
2.1 KiB
Bash
# This package source comes from Arch Linux: https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/gigi
|
|
|
|
pkgname=gigi
|
|
pkgver=0.8.0
|
|
pkgrel=8
|
|
_fixedrevision=5780 #5407
|
|
pkgdesc='Small, efficient and feature rich GUI for OpenGL and C++ (freeorion fork)'
|
|
#url='http://gigi.sourceforge.net/'
|
|
url='http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/GG/'
|
|
arch=('x86_64')
|
|
license=('LGPL')
|
|
depends=('boost' 'libpng' 'libtiff' 'ogre' 'sdl' 'python')
|
|
makedepends=('subversion' 'cmake' 'setconf' 'doxygen' 'libgl')
|
|
|
|
build() {
|
|
cd "$srcdir"
|
|
|
|
msg2 'Fetching files...'
|
|
if [ -d gigi/.svn ]; then
|
|
(cd gigi && svn up -r "$_fixedrevision")
|
|
else
|
|
#svn co https://gigi.svn.sourceforge.net/svnroot/gigi/trunk/GG/ \
|
|
svn co https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/GG/ \
|
|
--config-dir ./ -r "$_fixedrevision" gigi
|
|
fi
|
|
|
|
rm -rf gigi-build
|
|
svn export gigi gigi-build
|
|
cd gigi-build
|
|
|
|
msg2 'Configuring...'
|
|
setconf cmake/GiGiOgre.pc.in prefix /usr
|
|
setconf cmake/GiGi.pc.in prefix /usr
|
|
setconf cmake/GiGiSDL.pc.in prefix /usr
|
|
# It would be better if CMAKE_INSTALL_PREFIX or the resulting Makefiles
|
|
# could be re-configured in the package() function, but this works too.
|
|
cmake \
|
|
-D CMAKE_INSTALL_PREFIX="$srcdir/pkg/usr" \
|
|
-D BUILD_TUTORIALS=OFF \
|
|
-D CPACK_GENERATOR=GiGiDevel \
|
|
-D CMAKE_C_FLAGS_RELEASE='-DNDEBUG' \
|
|
.
|
|
|
|
msg2 'Building documentation...'
|
|
cd doc
|
|
doxygen
|
|
cd ..
|
|
|
|
msg2 'Compiling...'
|
|
make -j1
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/gigi-build"
|
|
|
|
msg2 'Packaging files...'
|
|
make install
|
|
|
|
msg2 'Moving files to the right location...'
|
|
mv -v "$srcdir/pkg/usr" "$pkgdir/"
|
|
|
|
msg2 'Fixing documentation...'
|
|
mkdir -p "$pkgdir/usr/share/doc"
|
|
mv "$pkgdir/usr/doc" "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
for f in `find "$pkgdir/usr/share/doc" -name "dir_*.html"`; do
|
|
sed -i "s:$srcdir:/:g" "$f"
|
|
done
|
|
|
|
msg2 'Python 3 fix...'
|
|
for f in `find "$pkgdir/usr" -name "*.py"`; do
|
|
sed -i "s:/env python:/python3:g" "$f"
|
|
done
|
|
|
|
msg2 'Packaging license...'
|
|
install -Dm644 COPYING \
|
|
"$pkgdir/usr/share/licenses/$pkgname/COPYING"
|
|
} |