source: npl/fileserver/tftp_hpa/tftp_hpa.SlackBuild @ 7c410f9

Last change on this file since 7c410f9 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.0 KB
Line 
1#!/bin/bash
2#DEP:libtermcap
3
4#######Essential package info.
5#Change these if autodetection fails.
6
7#Name of the Syn-3 package that we are going to create
8NAME=`basename $0|sed 's/.SlackBuild//'`
9
10#Archive of the sourcefiles to unpack
11SRC_ARC=`ls *.tar.* *.zip 2>/dev/null`
12
13#Version of the sourcefiles
14VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'`
15
16#Architecture that the created binaries run on.
17#Use noarch for scripts.
18ARCH=`uname -m`
19
20#from this point on, exit on errors:
21set -e
22
23########Build and create the pacakge.
24#Uncomment the stuff that you dont want or need
25
26#Unpack source
27#(uncomment if not needed)
28syn3_unpack $SRC_ARC
29
30#Directory where the sourcefiles are unpacked.
31#(you might have to adjust this if autodetection fails)
32SRC_DIR=`ls -c|head -1`
33
34#apply patches
35#patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1
36
37pushd $SRC_DIR
38
39#AUTOMAKE: Configure
40#Some usefull stuff you sometimes need to set:
41#export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/"
42#export LD_LIBRARY_PATH=/usr/lib/mysql
43#export VPATH=$LD_LIBRARY_PATH
44
45chown -R root:root .
46find . -perm 666 -exec chmod 644 {} \;
47find . -perm 664 -exec chmod 644 {} \;
48find . -perm 600 -exec chmod 644 {} \;
49find . -perm 444 -exec chmod 644 {} \;
50find . -perm 400 -exec chmod 644 {} \;
51find . -perm 440 -exec chmod 644 {} \;
52find . -perm 777 -exec chmod 755 {} \;
53find . -perm 775 -exec chmod 755 {} \;
54find . -perm 511 -exec chmod 755 {} \;
55find . -perm 711 -exec chmod 755 {} \;
56find . -perm 555 -exec chmod 755 {} \;
57
58MAKE_OPTS=""
59./configure --prefix=/usr --without-ipv6 --without-tcpwrappers || exit 1
60
61patch -p1 < ../get-off.patch || exit 1
62
63#AUTOMAKE: Compile
64make $MAKE_OPTS >/dev/null || exit 1
65
66#AUTOMAKE: Install
67mkdir -p /tmp/pkg &>/dev/null
68#make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install >/dev/null || exit 1
69PKG=/tmp/pkg
70
71cd tftp || exit 1
72strip --strip-unneeded tftp
73mkdir -p $PKG/usr/bin
74cat tftp > $PKG/usr/bin/tftp
75chmod 755 $PKG/usr/bin/tftp
76mkdir -p $PKG/usr/man/man{1,8}
77cat tftp.1 | gzip -9c > $PKG/usr/man/man1/tftp.1.gz
78cd ../tftpd
79strip --strip-unneeded tftpd
80mkdir -p $PKG/usr/sbin
81cat tftpd > $PKG/usr/sbin/in.tftpd
82chmod 755 $PKG/usr/sbin/in.tftpd
83cat tftpd.8 | gzip -9c > $PKG/usr/man/man8/in.tftpd.8.gz
84
85#(ugly) Overwrite the Atftp manual, if its there.. else you search until you're death....
86cp tftpd.8 $PKG/usr/man/man8/in.tftpd.8
87
88cd ..
89mkdir -p $PKG/usr/doc/tftp_hpa-$VER
90cp -a \
91  CHANGES INSTALL INSTALL.tftp README README.security \
92  $PKG/usr/doc/tftp_hpa-$VER
93
94mkdir -p $PKG/service/tftp_hpa
95mkdir -p $PKG/home/shares/tftp
96
97mkdir -p /tmp/pkg/etc/postinst.d
98cp ../post.tftp_hpa /tmp/pkg/etc/postinst.d || exit 1
99chmod +x /tmp/pkg/etc/postinst.d/*
100
101
102
103
104#strip bins and other stuff
105syn3_strip /tmp/pkg || exit 1
106
107#move development stuff and create seperate development package
108syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1
109syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1
110
111popd
112
113#make main package
114syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
115
116
117
Note: See TracBrowser for help on using the repository browser.