diff options
author | Danny Rawlins <romster@shortcircuit.net.au> | 2008-05-07 19:15:32 +1000 |
---|---|---|
committer | Danny Rawlins <romster@shortcircuit.net.au> | 2008-05-08 19:20:10 +1000 |
commit | 034962d2ea289a26d847daf1f2f49df5bd161a09 (patch) | |
tree | 21ea61fb529aecc4a7d3a72c7b8559be6e7f00d5 /distcc | |
parent | 630426be7ecaa1cc6da236f64a209372d1a512ec (diff) | |
download | contrib-034962d2ea289a26d847daf1f2f49df5bd161a09.tar.gz contrib-034962d2ea289a26d847daf1f2f49df5bd161a09.tar.xz |
distcc: moved symlinks out of Pkgfile
Diffstat (limited to 'distcc')
-rw-r--r-- | distcc/.footprint | 6 | ||||
-rw-r--r-- | distcc/.md5sum | 1 | ||||
-rw-r--r-- | distcc/Pkgfile | 27 | ||||
-rw-r--r-- | distcc/distcc-2.18.3-install.patch | 15 | ||||
-rwxr-xr-x | distcc/post-install | 28 | ||||
-rwxr-xr-x | distcc/post-remove | 15 |
6 files changed, 65 insertions, 27 deletions
diff --git a/distcc/.footprint b/distcc/.footprint index 034bcfddb..4139c744a 100644 --- a/distcc/.footprint +++ b/distcc/.footprint @@ -6,12 +6,6 @@ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/distcc -rwxr-xr-x root/root usr/bin/distccd -rwxr-xr-x root/root usr/bin/distccmon-text -drwxr-xr-x root/root usr/lib/ -drwxr-xr-x root/root usr/lib/distcc/ -lrwxrwxrwx root/root usr/lib/distcc/c++ -> ../../bin/distcc -lrwxrwxrwx root/root usr/lib/distcc/cc -> ../../bin/distcc -lrwxrwxrwx root/root usr/lib/distcc/g++ -> ../../bin/distcc -lrwxrwxrwx root/root usr/lib/distcc/gcc -> ../../bin/distcc drwxr-xr-x root/root usr/man/ drwxr-xr-x root/root usr/man/man1/ -rw-r--r-- root/root usr/man/man1/distcc.1.gz diff --git a/distcc/.md5sum b/distcc/.md5sum index 5811b8ba7..4c1f5e38b 100644 --- a/distcc/.md5sum +++ b/distcc/.md5sum @@ -1,2 +1,3 @@ +f478a7f8d8e65ff2710fdc4bd77e9b66 distcc-2.18.3-install.patch 0d6b80a1efc3a3d816c4f4175f63eaa2 distcc-2.18.3.tar.bz2 3e6bdcea02d0ec785f2cfed074bc5614 distccd diff --git a/distcc/Pkgfile b/distcc/Pkgfile index a8588b5e2..ddda9f416 100644 --- a/distcc/Pkgfile +++ b/distcc/Pkgfile @@ -1,22 +1,18 @@ # Description: A tool to distribute compilations. -# URL: http://distcc.samba.org +# URL: http://distcc.samba.org/ # Maintainer: Danny Rawlins, monster dot romster at gmail dot com # Packager: Johannes Winkelmann, jw at tks6 dot net # Depends on: popt name=distcc version=2.18.3 -release=3 +release=4 source=(http://distcc.samba.org/ftp/distcc/distcc-$version.tar.bz2 \ - distccd) + distcc-$version-install.patch distccd) build() { cd distcc-$version - - sed -i \ - -e "s|^sysconfdir='\${prefix}/etc'$|sysconfdir='/etc'|" \ - -e "s|^localstatedir='\${prefix}/var'$|localstatedir='/var'|" \ - configure + patch -p 1 -i ../distcc-$version-install.patch ./configure \ --prefix=/usr \ @@ -25,18 +21,7 @@ build() { --without-gtk make - make prefix=$PKG/usr install - - install -d $PKG/usr/lib/distcc - for c in cc c++ gcc g++; do - cd $PKG/usr/lib/distcc && ln -s ../../bin/distcc $c - done - - mkdir -p $PKG/etc/rc.d - install -m755 $SRC/distccd $PKG/etc/rc.d/distccd - - rm -rf $PKG/usr/share/doc - rm -rf $PKG/usr/info - rm -r $PKG/usr/share + make DESTDIR=$PKG install-man install-programs + install -m 0755 -D ../distccd $PKG/etc/rc.d/distccd } diff --git a/distcc/distcc-2.18.3-install.patch b/distcc/distcc-2.18.3-install.patch new file mode 100644 index 000000000..2527a755e --- /dev/null +++ b/distcc/distcc-2.18.3-install.patch @@ -0,0 +1,15 @@ +diff -pruN distcc-2.18.3.orig/configure distcc-2.18.3/configure +--- distcc-2.18.3.orig/configure 2008-05-07 11:40:41.950347462 +1000 ++++ distcc-2.18.3/configure 2008-05-07 11:50:41.411347269 +1000 +@@ -342,9 +342,9 @@ bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' + datadir='${prefix}/share' +-sysconfdir='${prefix}/etc' ++sysconfdir='/etc' + sharedstatedir='${prefix}/com' +-localstatedir='${prefix}/var' ++localstatedir='/var' + libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' diff --git a/distcc/post-install b/distcc/post-install new file mode 100755 index 000000000..c4471bfed --- /dev/null +++ b/distcc/post-install @@ -0,0 +1,28 @@ +#!/usr/bin/env sh +DIRECTORY='/usr/lib/distcc' +if [ ! -d "$DIRECTORY" ]; then + if [ -w '/usr/lib' ]; then + install -d "$DIRECTORY" + if [ $? -gt 0 ]; then + echo "post-install: error creating '$DIRECTORY'." + else + echo "post-install: '$DIRECTORY' created." + fi + pushd "$DIRECTORY" + for c in cc c++ gcc g++; do + if [ ! -e $c ]; then + ln -s ../../bin/distcc $c + if [ $? -gt 0 ]; then + echo "post-install: error creating symlink '../../bin/distcc $c'." + exit 1 + else + echo "post-install: create symlink '../../bin/distcc $c'." + fi + fi + done + popd + else + echo "Error: no permission to write to '/usr/lib'." + fi +fi +# End of file diff --git a/distcc/post-remove b/distcc/post-remove new file mode 100755 index 000000000..3ad629ef7 --- /dev/null +++ b/distcc/post-remove @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +DIRECTORY='/usr/lib/distcc' +if [ -d "$DIRECTORY" ]; then + if [ -w "$DIRECTORY" ]; then + rm -r "$DIRECTORY" + if [ $? -gt 0 ]; then + echo "post-remove: error remove '$DIRECTORY' failed." + else + echo "post-remove: '$DIRECTORY' removed." + fi + else + echo "post-remove: error no permission to remove '$DIRECTORY'." + fi +fi +# End of file |