source: npl/overig/bin/bin.SlackBuild.orig @ 30f002a

Last change on this file since 30f002a was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 3.8 KB
Line 
1#!/bin/sh
2
3# Copyright 2005-2009, 2010  Patrick J. Volkerding, Sebeka, Minnesota, USA
4# All rights reserved.
5#
6# Redistribution and use of this script, with or without modification, is
7# permitted provided that the following conditions are met:
8#
9# 1. Redistributions of this script must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11#
12#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
13#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
15#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
17#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
18#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
19#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
21#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23VERSION=11.1
24BUILD=${BUILD:-1}
25
26# Automatically determine the architecture we're building on:
27if [ -z "$ARCH" ]; then
28  case "$( uname -m )" in
29    i?86) export ARCH=i486 ;;
30    arm*) export ARCH=arm ;;
31    # Unless $ARCH is already set, use uname -m for all other archs:
32       *) export ARCH=$( uname -m ) ;;
33  esac
34fi
35
36CWD=$(pwd)
37TMP=${TMP:-/tmp}
38PKG=$TMP/package-bin
39
40# These don't need to be real recent, as we only require a couple
41# of things such as 'mktemp' and 'tempfile'.
42DUTILS=2.7
43
44# The fbset package
45FBSET=2.1
46
47rm -rf $PKG
48mkdir -p $TMP $PKG
49
50echo "+=============+"
51echo "| debianutils |"
52echo "+=============+"
53cd $TMP
54rm -rf debianutils-$DUTILS
55tar xzvf $CWD/debianutils_$DUTILS.tar.gz
56cd debianutils-$DUTILS
57chown -R root:root .
58./configure --prefix=/usr
59make || exit 1
60## We use our own very simple run-parts script
61## in the dcron package instead.
62#cat run-parts > $PKG/usr/bin/run-parts
63#cat run-parts.8 | gzip -9c > $PKG/usr/man/man8/run-parts.8.gz
64mkdir -p $PKG/usr/bin $PKG/usr/man/man{1,8}
65cat mktemp > $PKG/usr/bin/mktemp
66cat mktemp.1 | gzip -9c > $PKG/usr/man/man1/mktemp.1.gz
67cat savelog > $PKG/usr/bin/savelog
68cat savelog.8 | gzip -9c > $PKG/usr/man/man8/savelog.8.gz
69cat tempfile > $PKG/usr/bin/tempfile
70cat tempfile.1 | gzip -9c > $PKG/usr/man/man1/tempfile.1.gz
71chmod 755 $PKG/usr/bin/*
72mkdir -p $PKG/usr/doc/debianutils-$DUTILS
73cp -a debian/copyright $PKG/usr/doc/debianutils-$DUTILS
74
75
76echo "+=========+"
77echo "| banners |"
78echo "+=========+"
79cd $TMP
80rm -rf banners
81tar xzvf $CWD/banners.tar.gz
82cd banners
83chown -R root:root .
84make || exit 1
85cat bban > $PKG/usr/bin/bban
86cat sysvbanner > $PKG/usr/bin/sysvbanner
87chmod 755 $PKG/usr/bin/{bban,sysvbanner}
88
89echo "+===============+"
90echo "| todos/fromdos |"
91echo "+===============+"
92cd $TMP
93rm -rf todos
94tar xzvf $CWD/todos.tar.gz
95cd todos
96chown -R root:root .
97make || exit 1
98mkdir -p $PKG/usr/bin
99cat todos > $PKG/usr/bin/todos
100cat fromdos > $PKG/usr/bin/fromdos
101chmod 755 $PKG/usr/bin/*dos
102mkdir -p $PKG/usr/man/man1
103cat todos.1.gz > $PKG/usr/man/man1/todos.1.gz
104cat fromdos.1.gz > $PKG/usr/man/man1/fromdos.1.gz
105
106# These are a couple of really old scripts that might still
107# be useful for a couple more years.  :-)
108zcat $CWD/scripts/diskcopy.gz > $PKG/usr/bin/diskcopy
109zcat $CWD/scripts/xx.gz > $PKG/usr/bin/xx
110chmod 755 $PKG/usr/bin/diskcopy
111chmod 755 $PKG/usr/bin/xx
112
113( cd $PKG
114  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
115  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
116)
117
118mkdir -p $PKG/install
119cat $CWD/slack-desc > $PKG/install/slack-desc
120
121# Build the package:
122cd $PKG
123makepkg -l y -c n $TMP/bin-$VERSION-$ARCH-$BUILD.txz
124
Note: See TracBrowser for help on using the repository browser.