diff options
Diffstat (limited to 'gis/GMT/GMT.SlackBuild')
-rw-r--r-- | gis/GMT/GMT.SlackBuild | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/gis/GMT/GMT.SlackBuild b/gis/GMT/GMT.SlackBuild index 042f30be80..b6b7a68a77 100644 --- a/gis/GMT/GMT.SlackBuild +++ b/gis/GMT/GMT.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for GMT (Generic Mapping Tools) @@ -22,17 +22,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=GMT SRCNAM=gmt -VERSION=${VERSION:-6.0.0} +VERSION=${VERSION:-6.5.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} GSHHG=gshhg GSHHG_VERSION=${GSHHG_VERSION:-2.3.7} DCW=dcw -DCW_VERSION=${DCW_VERSION:-1.1.4} +DCW_VERSION=${DCW_VERSION:-2.1.2} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -42,7 +45,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -101,14 +111,19 @@ cd build -DDCW_ROOT=$PKG/usr/share/$SRCNAM/dcw \ -DCOPY_GSHHG=true \ -DCOPY_DCW=true \ + -DGMT_INSTALL_MODULE_LINKS=true \ -DLICENSE_RESTRICTED=$LICFLAG \ -DCMAKE_BUILD_TYPE=Release .. make all - make docs_man - make docs_html make install DESTDIR=$PKG cd .. +# Remove unwanted empty dirs +#rmdir $PKG/usr/doc/GMT-$VERSION/html/_video_thumbnail +#rmdir $PKG/usr/man/man1/_video_thumbnail +find $PKG/usr/doc/GMT-$VERSION/html -type d -empty -print0 | xargs -0 -I {} /usr/bin/rmdir "{}" +find $PKG/usr/man/man1/ -type d -empty -print0 | xargs -0 -I {} /usr/bin/rmdir "{}" + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -116,11 +131,11 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a BUILDING.md INSTALL.md LICENSE.TXT README.md $PKG/usr/doc/$PRGNAM-$VERSION +cp -a BUILDING.md LICENSE.TXT README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |