1 | #!/bin/bash
|
---|
2 |
|
---|
3 | # $Id$
|
---|
4 |
|
---|
5 | set -e
|
---|
6 | cd $PKGDIR
|
---|
7 |
|
---|
8 | ./configure --prefix=/usr --sysconfdir=/etc
|
---|
9 | make
|
---|
10 | if ! [ -z $PKG_DEST ]; then
|
---|
11 | mkdir -pv $PKG_DEST/{lib,usr/{share/{man,doc,info},lib}}
|
---|
12 | ln -sv share/{man,doc,info} $PKG_DEST/usr
|
---|
13 | case $(uname -m) in
|
---|
14 | x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
|
---|
15 | esac
|
---|
16 | fi
|
---|
17 | make DESTDIR=$PKG_DEST install
|
---|
18 | ln -v -s libgpm.so.2.1.0 $PKG_DEST/usr/lib/libgpm.so
|
---|
19 | mkdir -pv $PKG_DEST/etc
|
---|
20 | install -v -m644 conf/gpm-root.conf $PKG_DEST/etc
|
---|
21 | install -v -m755 -d $PKG_DEST/usr/share/doc/gpm-1.20.6
|
---|
22 | chmod -v 755 doc/{changes,support}
|
---|
23 | chmod -v 644 doc/{changes/*,support/*,FAQ,HACK_GPM,README*}
|
---|
24 | cp -v -R doc/{FAQ,HACK_GPM,README*,changes,support} \
|
---|
25 | $PKG_DEST/usr/share/doc/gpm-1.20.6
|
---|
26 | if ! [ -z $PKG_DEST ]; then
|
---|
27 | rm -fv $PKG_DEST/{,usr/}lib64
|
---|
28 | rm -fv $PKG_DEST/usr/{man,doc,info}
|
---|
29 | for dir in $PKG_DEST/usr/share/{doc,info,man}; do
|
---|
30 | [[ -z $(ls $dir) ]] && rmdir -v $dir
|
---|
31 | done
|
---|
32 | for dir in $PKG_DEST/usr/{lib,share}; do
|
---|
33 | [[ -z $(ls $dir) ]] && rmdir -v $dir
|
---|
34 | done
|
---|
35 | for dir in $PKG_DEST/{lib,usr}; do
|
---|
36 | [[ -z $(ls $dir) ]] && rmdir -v $dir
|
---|
37 | done
|
---|
38 | packInstall
|
---|
39 | fi
|
---|
40 | rm -rf $PKG_DEST
|
---|
41 |
|
---|
42 | exit
|
---|