Skip to content
Browse files

Update Commit

- version update for apache-ant...
- removed pmount, sdcc scripts...
  • Loading branch information...
1 parent 6a659fd commit 6f9f9790931bf28c2b90810ccf5647f7b0820f7c @azman committed Oct 8, 2012
Showing with 2 additions and 719 deletions.
  1. +2 −2 apache-ant.SlackBuild
  2. +0 −361 pmount.SlackBuild
  3. +0 −356 sdcc.SlackBuild
View
4 apache-ant.SlackBuild
@@ -4,7 +4,7 @@
THIS_NAME="$(basename $0)"
THIS_PATH="$(dirname $0)"
PROG_NAME=${PROG_NAME:="$(basename $THIS_NAME .${THIS_NAME##*.})"}
-PROG_VERS=${PROG_VERS:="1.8.3"} # CHANGE TO WHAT WE NEED
+PROG_VERS=${PROG_VERS:="1.8.4"} # CHANGE TO WHAT WE NEED
PROG_FULL="$PROG_NAME-$PROG_VERS" # SHOULD BE TOP FOLDER'S NAME
PROG_BALL="$PROG_FULL-bin.tar.bz2" # CAN BE OTHER THAN $PROG_FULL
# PLACE URL ACCORDINGLY!
@@ -40,7 +40,7 @@ CHK_MOVEPACK=${CHK_MOVEPACK:="NO"}
function prepare_source()
{
# PREPARE SOURCE MANUALLY
- return
+ return 0
}
function do_build()
View
361 pmount.SlackBuild
@@ -1,361 +0,0 @@
-#!/bin/sh
-
-# INFO FOR PROGRAM TO BE BUILT
-THIS_NAME="$(basename $0)"
-THIS_PATH="$(dirname $0)"
-PROG_NAME=${PROG_NAME:="$(basename $THIS_NAME .${THIS_NAME##*.})"}
-PROG_VERS=${PROG_VERS:="0.9.19"} # CHANGE TO WHAT WE NEED
-PROG_FULL="$PROG_NAME-$PROG_VERS" # SHOULD BE TOP FOLDER'S NAME
-PROG_BALL="$PROG_FULL.tar.gz" # CAN BE OTHER THAN $PROG_FULL
-# PLACE URL ACCORDINGLY!
-PROG_PATH="http://alioth.debian.org/frs/download.php/2867/"
-PROG_LOAD="${PROG_PATH}${PROG_BALL}"
-# ASSIGN DOCS ACCORDINGLY!
-PROG_DOCS="AUTHORS README* COPYING ChangeLog INSTALL NEWS TODO"
-# DEPS LIST? (build-time?)
-PROG_DEPS=""
-# CHECK MACHINE ARCH!
-if [[ "$ARCH" == "" ]]; then
- ARCH="$(uname -m)"
- case "$ARCH" in
- i?86) ARCH="i486" ;;
- arm*) ARCH="arm" ;;
- esac
-fi
-# OUTPUT PACKAGE PARAMS
-BUILD_TAG=${BUILD_TAG:="1_my1"}
-PACK_TYPE=${PACK_TYPE:="tgz"}
-PACK_ARCH=${PACK_ARCH:="$ARCH"}
-PACK_PATH=${PACK_PATH:="/tmp"}
-PACK_BALL=${PACK_BALL:="$PROG_NAME-$PROG_VERS-$PACK_ARCH-$BUILD_TAG.$PACK_TYPE"}
-# BUILD-RELATED PATH
-CURR_PATH=$(cd $THIS_PATH; pwd)
-TEMP_PATH=${TEMP_PATH:="/tmp/my1/slackbuild"}
-DEST_PATH=$TEMP_PATH/package-$PROG_NAME
-# COMMAND-LINE OPTIONS
-CHK_DOWNLOAD=${CHK_DOWNLOAD:="NO"}
-CHK_LOADONLY=${CHK_LOADONLY:="NO"}
-CHK_MOVEPACK=${CHK_MOVEPACK:="NO"}
-
-function prepare_source()
-{
- # PREPARE SOURCE MANUALLY
- return
-}
-
-function do_build()
-{
- # ACTUAL BUILD PROCESS
- CFLAGS="$SLACKCFLAGS" \
- CXXFLAGS="$SLACKCFLAGS" \
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PROG_FULL \
- --enable-hal \
- --disable-static \
- --build=$PACK_ARCH-slackware-linux$ARCHQUADLET
- make
- make install DESTDIR=$DEST_PATH
-}
-
-function do_pre_build()
-{
- # PLACE FIX/PRE-BUILD SCRIPT HERE!
- return
-}
-
-function do_post_build()
-{
- # PLACE FIX/POST-BUILD SCRIPT HERE!
- chown root.plugdev $DEST_PATH/usr/bin/pmount $DEST_PATH/usr/bin/pumount
- chmod 4750 $DEST_PATH/usr/bin/pmount $DEST_PATH/usr/bin/pumount
- mv $DEST_PATH/etc/pmount.allow $DEST_PATH/etc/pmount.allow.new
-}
-
-function do_install_stuff()
-{
- # COPY INSTALLATION-RELATED FILE(S)
- mkdir -p $DEST_PATH/install
- RULER_SPC="$(printf "%*s" ${#PROG_NAME} "")";
-THIS_SLACKDESC=$(cat <<SLACK-DESC
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
-${RULER_SPC}|-----handy-ruler------------------------------------------------------|
-pmount: pmount (mount removable devices as normal user)
-pmount:
-pmount: pmount is a wrapper around the standard mount program which
-pmount: permits normal users to mount removable devices without a
-pmount: matching entry in /etc/fstab.
-pmount:
-pmount: Homepage: http://pmount.alioth.debian.org/
-pmount:
-pmount:
-pmount:
-pmount:
-SLACK-DESC
-)
- echo "$THIS_SLACKDESC" > $DEST_PATH/install/slack-desc
-THIS_DOINSTSH=$(cat <<DOINSTSH
-function check_config()
-{
- local confNew="\$1"
- local confOld="\$(dirname \$confNew)/\$(basename \$confNew .new)"
- if [[ ! -r \$confOLD ]]; then
- mv \$confNew \$confOld
- elif [[ "\$(cat \$confOld | md5sum)" == "\$(cat \$confNew | md5sum)" ]]; then
- rm \$confNew
- fi
-}
-check_config etc/pmount.allow.new
-DOINSTSH
-)
- echo "$THIS_DOINSTSH" > $DEST_PATH/install/doinst.sh
-}
-
-function do_post_package()
-{
- # PLACE POST-PACKAGE SCRIPT HERE!
- show_deps
-}
-
-# ONLY TEMPLATES BELOW THIS LINE
-
-function show_deps()
-{
- if [[ "$PROG_DEPS" != "" ]] ; then
- echo -n "This software '$PROG_NAME' requires: "
- for dep in "$PROG_DEPS" ; do
- echo -n "$dep "
- dep="$(cd ${THIS_PATH};pwd)/${dep}.SlackBuild"
- if [[ -r "$dep" ]] ; then
- echo -n "($dep)"
- else
- echo -n "(not found!)"
- fi
- done
- echo
- fi
-}
-
-function check_param()
-{
- while [[ "$1" != "" ]]; do
- case $1 in
- --load )
- CHK_DOWNLOAD="YES"
- ;;
- --load-only )
- CHK_DOWNLOAD="YES"
- CHK_LOADONLY="YES"
- ;;
- --move-here )
- MOVE_PATH=$CURR_PATH
- CHK_MOVEPACK="YES"
- ;;
- --move )
- shift
- MOVE_PATH=$1
- CHK_MOVEPACK="YES"
- [[ ! -d "$MOVE_PATH" ]] &&
- echo "Invalid '--move' path ($MOVE_PATH)!" && exit 1
- MOVE_PATH=$(cd $MOVE_PATH;pwd)
- ;;
- --show-deps )
- show_deps
- exit 0
- ;;
- * )
- echo "Unknown parameter ($1)!" && exit 1
- ;;
- esac
- shift
- done
- # set these as early as possible?
- set -e # exit immediately when non-zero exit status
- trap 'echo "$0 FAILED at line $LINENO!"' ERR
-}
-
-function do_download()
-{
- local fname="$1"
- local label="$2"
- local cpath="$(pwd)"
- [[ "$fname" == "" ]] && exit 1 # shouldn't be here?
- [[ "$label" == "" ]] && label="$fname"
- echo -n "Downloading $label: "
- wget --progress=dot "$fname" 2>&1 | grep --line-buffered "%" | \
- sed -u -e "s,\.,,g" | awk '{printf("\b\b\b\b%4s", $2)}'
- echo -ne "\b\b\b\b DONE!\n"
- [[ ! -r "$label" ]] &&
- echo "Cannot download source $cpath/$label!" && exit 1
- local chk_perm=$(get_userngrp $cpath)
- [[ "$chk_perm" != "" ]] && chown $chk_perm $cpath/$label
-}
-
-function check_source()
-{
- local chk_path="$(pwd)"
- cd $CURR_PATH
- if [[ ! -r "$PROG_BALL" ]]; then
- if [[ "$CHK_DOWNLOAD" == "YES" ]]; then
- do_download $PROG_LOAD $PROG_BALL
- else
- echo "Source $CURR_PATH/$PROG_BALL not found!" && exit 1
- fi
- fi
- cd $chk_path
- [[ "$CHK_LOADONLY" == "YES" ]] && exit 0
- return 0
-}
-
-function check_buildenv()
-{
- # CHECK ENVIRONMENT!
- case "$PACK_ARCH" in
- "i486")
- SLACKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- ARCHQUADLET=""
- ;;
- "i686")
- SLACKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
- ARCHQUADLET=""
- ;;
- "x86_64")
- SLACKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- ARCHQUADLET=""
- ;;
- "arm")
- SLACKCFLAGS="-O2 -march=armv4t"
- LIBDIRSUFFIX=""
- ARCHQUADLET="-gnueabi"
- ;;
- *)
- SLACKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- ARCHQUADLET=""
- ;;
- esac
-}
-
-function prepare_build()
-{
- rm -rf $DEST_PATH
- mkdir -p $TEMP_PATH $DEST_PATH $PACK_PATH
- cd $TEMP_PATH
- rm -rf $PROG_FULL
- tar xvf $CURR_PATH/$PROG_BALL
- if [[ -d $PROG_FULL ]]; then
- cd $PROG_FULL
- elif [[ -d $PROG_NAME ]]; then
- cd $PROG_NAME
- else
- echo "Cannot find path '$PROG_FULL' or '$PROG_NAME'! Aborting!"
- exit 1
- fi
- chown -R root:root .
- chmod -R u+r+w,go+r-w,a+X-s-t .
-}
-
-function strip_binaries()
-{
- find $DEST_PATH | xargs file | grep -e "executable" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find $DEST_PATH | xargs file | grep -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-}
-
-function check_manual_info()
-{
- # PREPARE MAN PAGES?
- if [[ -d $DEST_PATH/usr/man ]]; then
- find $DEST_PATH/usr/man -type f -exec gzip -9 {} \;
- for i in $(find $DEST_PATH/usr/man -type l) ; do
- ln -s $( readlink $i ).gz $i.gz
- rm $i
- done
- fi
- # PREPARE INFO PAGES?
- if [[ -d $DEST_PATH/usr/info ]]; then
- gzip -9 $DEST_PATH/usr/info/*.info
- rm -f $DEST_PATH/usr/info/dir
- fi
-}
-
-function check_documentation()
-{
- mkdir -p $DEST_PATH/usr/doc/$PROG_FULL
- cat $CURR_PATH/$THIS_NAME > $DEST_PATH/usr/doc/$PROG_FULL/$THIS_NAME
- [[ "$the_docs" == "" ]] && return
- cp -a $PROG_DOCS $DEST_PATH/usr/doc/$PROG_FULL
-}
-
-function get_userngrp()
-{
- local chk_this=$1
- local chk_path
- local chk_user chk_grpn
- [[ "$chk_this" == "." ]] && chk_this=$(pwd)
- [[ "$chk_this" == ".." ]] && chk_this=$(cd .. ;pwd)
- [[ ! -r "$chk_this" ]] && echo -e "Cannot read '$chk_this'!" 1>&2 && return
- chk_path=$(cd $(dirname $chk_this);pwd)
- chk_this=$(basename $chk_this)
- chk_user=$(ls -l "${chk_path}/" | grep -e "${chk_this}$")
- set -- $chk_user
- chk_user=$3
- chk_grpn=$4
- echo -n "$chk_user:$chk_grpn"
-}
-
-function make_slackpkg()
-{
- cd $DEST_PATH
- /sbin/makepkg -l y -c n $PACK_PATH/$PACK_BALL
- if [[ "$CHK_MOVEPACK" == "YES" ]]; then
- local chk_perm=$(get_userngrp $MOVE_PATH)
- [[ "$chk_perm" != "" ]] && chown $chk_perm $PACK_PATH/$PACK_BALL
- mv $PACK_PATH/$PACK_BALL $MOVE_PATH/
- echo -e "\nPackage $PACK_PATH/$PACK_BALL moved to $MOVE_PATH!\n"
- fi
-}
-
-# CHECK COMMAND-LINE PARAMETER - TEMPLATE
-check_param $@
-# ONLY ROOT CAN BUILD!
-[[ $UID -ne 0 ]] && echo "[ERROR] Must run as root! Aborting!" && exit 1
-# IN CASE SOURCE FROM REPO - CUSTOM (OPTIONAL)
-prepare_source
-# CHECK IF SOURCE EXISTS - TEMPLATE
-check_source
-# CHECK THE BUILD ENVIRONMENT - TEMPLATE
-check_buildenv
-# PREPARE FOR THE BUILD - TEMPLATE
-prepare_build
-# EXTRA STUFF - CUSTOM (OPTIONAL)
-do_pre_build
-# ACTUAL BUILD PROCESS - CUSTOM (STANDARD)
-do_build
-# EXTRA STUFF - CUSTOM (OPTIONAL)
-do_post_build
-# STRIP SIZE OF BINARIES - TEMPLATE
-strip_binaries
-# PREPARE MAN & INFO PAGES - TEMPLATE
-check_manual_info
-# COPY DOCUMENTATION FILE(S) - TEMPLATE
-check_documentation
-# PREP FOR INSTALLATION - CUSTOM (STANDARD)
-do_install_stuff
-# MAKE SLACKWARE PACKAGE - TEMPLATE
-make_slackpkg
-# EXTRA POST-PACKAGING - CUSTOM (OPTIONAL)
-do_post_package
View
356 sdcc.SlackBuild
@@ -1,356 +0,0 @@
-#!/bin/sh
-
-# INFO FOR PROGRAM TO BE BUILT
-THIS_NAME="$(basename $0)"
-THIS_PATH="$(dirname $0)"
-PROG_NAME=${PROG_NAME:="$(basename $THIS_NAME .${THIS_NAME##*.})"}
-PROG_VERS=${PROG_VERS:="3.0.0"} # CHANGE TO WHAT WE NEED
-PROG_FULL="$PROG_NAME-$PROG_VERS" # SHOULD BE TOP FOLDER'S NAME
-PROG_BALL="$PROG_NAME-src-$PROG_VERS.tar.bz2" # CAN BE OTHER THAN $PROG_FULL
-# PLACE URL ACCORDINGLY!
-PROG_PATH="http://downloads.sourceforge.net/sdcc/"
-PROG_LOAD="${PROG_PATH}${PROG_BALL}"
-# ASSIGN DOCS ACCORDINGLY!
-PROG_DOCS="COPYING ChangeLog"
-# DEPS LIST? (build-time?)
-PROG_DEPS=""
-# CHECK MACHINE ARCH!
-if [[ "$ARCH" == "" ]]; then
- ARCH="$(uname -m)"
- case "$ARCH" in
- i?86) ARCH="i486" ;;
- arm*) ARCH="arm" ;;
- esac
-fi
-# OUTPUT PACKAGE PARAMS
-BUILD_TAG=${BUILD_TAG:="1_my1"}
-PACK_TYPE=${PACK_TYPE:="tgz"}
-PACK_ARCH=${PACK_ARCH:="$ARCH"}
-PACK_PATH=${PACK_PATH:="/tmp"}
-PACK_BALL=${PACK_BALL:="$PROG_NAME-$PROG_VERS-$PACK_ARCH-$BUILD_TAG.$PACK_TYPE"}
-# BUILD-RELATED PATH
-CURR_PATH=$(cd $THIS_PATH; pwd)
-TEMP_PATH=${TEMP_PATH:="/tmp/my1/slackbuild"}
-DEST_PATH=$TEMP_PATH/package-$PROG_NAME
-# COMMAND-LINE OPTIONS
-CHK_DOWNLOAD=${CHK_DOWNLOAD:="NO"}
-CHK_LOADONLY=${CHK_LOADONLY:="NO"}
-CHK_MOVEPACK=${CHK_MOVEPACK:="NO"}
-
-function prepare_source()
-{
- # PREPARE SOURCE MANUALLY
- return
-}
-
-function do_build()
-{
- # ACTUAL BUILD PROCESS
- CFLAGS="$SLACKCFLAGS" \
- CXXFLAGS="$SLACKCFLAGS" \
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=/usr/info \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PROG_FULL \
- --disable-gbz80-port \
- --disable-z80-port \
- --disable-ds390-port \
- --disable-ds400-port \
- --disable-pic-port \
- --disable-pic16-port \
- --disable-hc08-port \
- --build=$PACK_ARCH-slackware-linux$ARCHQUADLET
- make
- make install DESTDIR=$DEST_PATH
-}
-
-function do_pre_build()
-{
- # PLACE FIX/PRE-BUILD SCRIPT HERE!
- return
-}
-
-function do_post_build()
-{
- # PLACE FIX/POST-BUILD SCRIPT HERE!
- return
-}
-
-function do_install_stuff()
-{
- # COPY INSTALLATION-RELATED FILE(S)
- mkdir -p $DEST_PATH/install
- RULER_SPC="$(printf "%*s" ${#PROG_NAME} "")";
-THIS_SLACKDESC=$(cat <<SLACK-DESC
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
-${RULER_SPC}|-----handy-ruler------------------------------------------------------|
-sdcc: sdcc (Small Device C Compiler)
-sdcc:
-sdcc: SDCC is a retargettable, optimizing ANSI C compiler that targets
-sdcc: the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08
-sdcc: based MCUs. Work is in progress on supporting the Microchip
-sdcc: PIC16 and PIC18 series.
-sdcc:
-sdcc: This build, however, targets Intel 8051 Family ONLY.
-sdcc:
-sdcc:
-sdcc:
-SLACK-DESC
-)
- echo "$THIS_SLACKDESC" > $DEST_PATH/install/slack-desc
-#THIS_DOINSTSH=$(cat <<DOINSTSH
-#if [ -x /usr/bin/update-desktop-database ]; then
-# /usr/bin/update-desktop-database -q usr/share/applications
-#fi
-#DOINSTSH
-#)
- #echo "$THIS_DOINSTSH" > $DEST_PATH/install/doinst.sh
-}
-
-function do_post_package()
-{
- # PLACE POST-PACKAGE SCRIPT HERE!
- show_deps
-}
-
-# ONLY TEMPLATES BELOW THIS LINE
-
-function show_deps()
-{
- if [[ "$PROG_DEPS" != "" ]] ; then
- echo -n "This software '$PROG_NAME' requires: "
- for dep in "$PROG_DEPS" ; do
- echo -n "$dep "
- dep="$(cd ${THIS_PATH};pwd)/${dep}.SlackBuild"
- if [[ -r "$dep" ]] ; then
- echo -n "($dep)"
- else
- echo -n "(not found!)"
- fi
- done
- echo
- fi
-}
-
-function check_param()
-{
- while [[ "$1" != "" ]]; do
- case $1 in
- --load )
- CHK_DOWNLOAD="YES"
- ;;
- --load-only )
- CHK_DOWNLOAD="YES"
- CHK_LOADONLY="YES"
- ;;
- --move-here )
- MOVE_PATH=$CURR_PATH
- CHK_MOVEPACK="YES"
- ;;
- --move )
- shift
- MOVE_PATH=$1
- CHK_MOVEPACK="YES"
- [[ ! -d "$MOVE_PATH" ]] &&
- echo "Invalid '--move' path ($MOVE_PATH)!" && exit 1
- MOVE_PATH=$(cd $MOVE_PATH;pwd)
- ;;
- --show-deps )
- show_deps
- exit 0
- ;;
- * )
- echo "Unknown parameter ($1)!" && exit 1
- ;;
- esac
- shift
- done
- # set these as early as possible?
- set -e # exit immediately when non-zero exit status
- trap 'echo "$0 FAILED at line $LINENO!"' ERR
-}
-
-function do_download()
-{
- local fname="$1"
- local label="$2"
- local cpath="$(pwd)"
- [[ "$fname" == "" ]] && exit 1 # shouldn't be here?
- [[ "$label" == "" ]] && label="$fname"
- echo -n "Downloading $label: "
- wget --progress=dot "$fname" 2>&1 | grep --line-buffered "%" | \
- sed -u -e "s,\.,,g" | awk '{printf("\b\b\b\b%4s", $2)}'
- echo -ne "\b\b\b\b DONE!\n"
- [[ ! -r "$label" ]] &&
- echo "Cannot download source $cpath/$label!" && exit 1
- local chk_perm=$(get_userngrp $cpath)
- [[ "$chk_perm" != "" ]] && chown $chk_perm $cpath/$label
-}
-
-function check_source()
-{
- local chk_path="$(pwd)"
- cd $CURR_PATH
- if [[ ! -r "$PROG_BALL" ]]; then
- if [[ "$CHK_DOWNLOAD" == "YES" ]]; then
- do_download $PROG_LOAD $PROG_BALL
- else
- echo "Source $CURR_PATH/$PROG_BALL not found!" && exit 1
- fi
- fi
- cd $chk_path
- [[ "$CHK_LOADONLY" == "YES" ]] && exit 0
- return 0
-}
-
-function check_buildenv()
-{
- # CHECK ENVIRONMENT!
- case "$PACK_ARCH" in
- "i486")
- SLACKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- ARCHQUADLET=""
- ;;
- "i686")
- SLACKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
- ARCHQUADLET=""
- ;;
- "x86_64")
- SLACKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- ARCHQUADLET=""
- ;;
- "arm")
- SLACKCFLAGS="-O2 -march=armv4t"
- LIBDIRSUFFIX=""
- ARCHQUADLET="-gnueabi"
- ;;
- *)
- SLACKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- ARCHQUADLET=""
- ;;
- esac
-}
-
-function prepare_build()
-{
- rm -rf $DEST_PATH
- mkdir -p $TEMP_PATH $DEST_PATH $PACK_PATH
- cd $TEMP_PATH
- rm -rf $PROG_FULL
- tar xvf $CURR_PATH/$PROG_BALL
- if [[ -d $PROG_FULL ]]; then
- cd $PROG_FULL
- elif [[ -d $PROG_NAME ]]; then
- cd $PROG_NAME
- else
- echo "Cannot find path '$PROG_FULL' or '$PROG_NAME'! Aborting!"
- exit 1
- fi
- chown -R root:root .
- chmod -R u+r+w,go+r-w,a+X-s-t .
-}
-
-function strip_binaries()
-{
- find $DEST_PATH | xargs file | grep -e "executable" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find $DEST_PATH | xargs file | grep -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-}
-
-function check_manual_info()
-{
- # PREPARE MAN PAGES?
- if [[ -d $DEST_PATH/usr/man ]]; then
- find $DEST_PATH/usr/man -type f -exec gzip -9 {} \;
- for i in $(find $DEST_PATH/usr/man -type l) ; do
- ln -s $( readlink $i ).gz $i.gz
- rm $i
- done
- fi
- # PREPARE INFO PAGES?
- if [[ -d $DEST_PATH/usr/info ]]; then
- gzip -9 $DEST_PATH/usr/info/*.info
- rm -f $DEST_PATH/usr/info/dir
- fi
-}
-
-function check_documentation()
-{
- mkdir -p $DEST_PATH/usr/doc/$PROG_FULL
- cat $CURR_PATH/$THIS_NAME > $DEST_PATH/usr/doc/$PROG_FULL/$THIS_NAME
- [[ "$the_docs" == "" ]] && return
- cp -a $PROG_DOCS $DEST_PATH/usr/doc/$PROG_FULL
-}
-
-function get_userngrp()
-{
- local chk_this=$1
- local chk_path
- local chk_user chk_grpn
- [[ "$chk_this" == "." ]] && chk_this=$(pwd)
- [[ "$chk_this" == ".." ]] && chk_this=$(cd .. ;pwd)
- [[ ! -r "$chk_this" ]] && echo -e "Cannot read '$chk_this'!" 1>&2 && return
- chk_path=$(cd $(dirname $chk_this);pwd)
- chk_this=$(basename $chk_this)
- chk_user=$(ls -l "${chk_path}/" | grep -e "${chk_this}$")
- set -- $chk_user
- chk_user=$3
- chk_grpn=$4
- echo -n "$chk_user:$chk_grpn"
-}
-
-function make_slackpkg()
-{
- cd $DEST_PATH
- /sbin/makepkg -l y -c n $PACK_PATH/$PACK_BALL
- if [[ "$CHK_MOVEPACK" == "YES" ]]; then
- local chk_perm=$(get_userngrp $MOVE_PATH)
- [[ "$chk_perm" != "" ]] && chown $chk_perm $PACK_PATH/$PACK_BALL
- mv $PACK_PATH/$PACK_BALL $MOVE_PATH/
- echo -e "\nPackage $PACK_PATH/$PACK_BALL moved to $MOVE_PATH!\n"
- fi
-}
-
-# CHECK COMMAND-LINE PARAMETER - TEMPLATE
-check_param $@
-# ONLY ROOT CAN BUILD!
-[[ $UID -ne 0 ]] && echo "[ERROR] Must run as root! Aborting!" && exit 1
-# IN CASE SOURCE FROM REPO - CUSTOM (OPTIONAL)
-prepare_source
-# CHECK IF SOURCE EXISTS - TEMPLATE
-check_source
-# CHECK THE BUILD ENVIRONMENT - TEMPLATE
-check_buildenv
-# PREPARE FOR THE BUILD - TEMPLATE
-prepare_build
-# EXTRA STUFF - CUSTOM (OPTIONAL)
-do_pre_build
-# ACTUAL BUILD PROCESS - CUSTOM (STANDARD)
-do_build
-# EXTRA STUFF - CUSTOM (OPTIONAL)
-do_post_build
-# STRIP SIZE OF BINARIES - TEMPLATE
-strip_binaries
-# PREPARE MAN & INFO PAGES - TEMPLATE
-check_manual_info
-# COPY DOCUMENTATION FILE(S) - TEMPLATE
-check_documentation
-# PREP FOR INSTALLATION - CUSTOM (STANDARD)
-do_install_stuff
-# MAKE SLACKWARE PACKAGE - TEMPLATE
-make_slackpkg
-# EXTRA POST-PACKAGING - CUSTOM (OPTIONAL)
-do_post_package

0 comments on commit 6f9f979

Please sign in to comment.
Something went wrong with that request. Please try again.