[arch-commits] Commit in gigi/trunk (PKGBUILD)
Alexander Rødseth
arodseth at nymeria.archlinux.org
Wed Feb 6 09:02:52 UTC 2013
Date: Wednesday, February 6, 2013 @ 10:02:51
Author: arodseth
Revision: 83875
Removing $pkgdir from the build() function
Modified:
gigi/trunk/PKGBUILD
----------+
PKGBUILD | 40 ++++++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 12 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2013-02-05 23:22:09 UTC (rev 83874)
+++ PKGBUILD 2013-02-06 09:02:51 UTC (rev 83875)
@@ -9,7 +9,7 @@
pkgver=0.8.0
pkgrel=16
_fixedrevision=5407 # 5208
-pkgdesc="Small, efficient and feature rich GUI for C++ and OpenGL (freeorion fork)"
+pkgdesc='Small, efficient and feature rich GUI for C++ and OpenGL (freeorion fork)'
url="http://gigi.sourceforge.net/"
arch=('x86_64' 'i686')
license=('LGPL')
@@ -19,7 +19,7 @@
build() {
cd "$srcdir"
- msg2 "Fetching files..."
+ msg2 'Fetching files...'
if [ -d gigi/.svn ]; then
(cd gigi && svn up -r "$_fixedrevision")
else
@@ -32,33 +32,49 @@
svn export gigi gigi-build
cd gigi-build
- msg2 "Configuring..."
+ msg2 'Configuring...'
setconf cmake/GiGiOgre.pc.in prefix /usr
setconf cmake/GiGi.pc.in prefix /usr
setconf cmake/GiGiSDL.pc.in prefix /usr
+
cmake \
- -D CMAKE_INSTALL_PREFIX="$pkgdir"/usr \
-D BUILD_TUTORIALS=OFF \
-D CPACK_GENERATOR=GiGiDevel \
- -D CMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
+ -D CMAKE_INSTALL_PREFIX="/usr" \
+ -D CMAKE_C_FLAGS_RELEASE='-DNDEBUG' \
.
- msg2 "Building documentation..."
+ msg2 'Building documentation...'
cd doc
doxygen
cd ..
- msg2 "Compiling..."
+ msg2 'Compiling...'
make -j1
}
package() {
cd "$srcdir/gigi-build"
- msg2 "Packaging files..."
+ find . -type f -exec sed -i "s:/usr/local:$pkgdir/usr:" {} \;
+ #find . -type f -exec sed -i "s:/include:$pkgdir/usr/include:" {} \;
+
+ # Since $pkgdir can't be used in the build() function
+ # when running cmake, this is the workaround
+ #setconf CMakeCache.txt 'CMAKE_INSTALL_PREFIX:PATH' "$pkgdir/usr"
+ #sed -i "s:FIX \"/usr/local:FIX \"$pkgdir/usr:" \
+ # cmake_install.cmake \
+ # CPackConfig.cmake \
+ # src/cmake_install.cmake \
+ # src/SDL/cmake_install.cmake \
+ # src/Ogre/Plugins/cmake_install.cmake \
+ # src/Ogre/cmake_install.cmake \
+ # CPackSourceConfig.cmake
+
+ msg2 'Packaging files...'
make install
- msg2 "Fixing documentation..."
+ msg2 'Fixing documentation...'
mkdir -p "$pkgdir/usr/share/doc"
mv "$pkgdir/usr/doc" "$pkgdir/usr/share/doc/$pkgname"
@@ -66,13 +82,13 @@
sed -i "s:$srcdir:/:g" "$f"
done
- msg2 "Fixing python3 shebang..."
+ 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 -Dm 644 COPYING \
+ msg2 'Packaging license...'
+ install -Dm644 COPYING \
"$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
More information about the arch-commits
mailing list