3 MAINTAINER
='Michael Polak <x@n.cz>'
4 DEB_PCK_NAME
=prometheus
6 DEBIAN_BASE
=$DEB_PCK_NAME.tmp
9 rm -r $DEBIAN_BASE 2>/dev
/null
11 mkdir
-p $DEBIAN_BASE/usr
12 mkdir
-p $DEBIAN_BASE/usr
/sbin
13 mkdir
-p $DEBIAN_BASE/usr
/share
14 mkdir
-p $DEBIAN_BASE/usr
/share
/man
15 mkdir
-p $DEBIAN_BASE/usr
/share
/man
/man1
16 mkdir
-p $DEBIAN_BASE/usr
/share
/man
/man5
18 mkdir
-p $DEBIAN_BASE/DEBIAN
19 chmod 0755 $DEBIAN_BASE/DEBIAN
21 if ! [ -x prometheus
]; then
26 cp prometheus
$DEBIAN_BASE/usr
/sbin
27 cp prometheus
.1 $DEBIAN_BASE/usr
/share
/man
/man1
28 cp prometheus.conf
.5 $DEBIAN_BASE/usr
/share
/man
/man5
29 cp -R etc
$DEBIAN_BASE/etc
32 rm -rf $DEBIAN_BASE/etc
/.svn
33 rm -rf $DEBIAN_BASE/etc
/*/.svn
36 chmod 755 $DEBIAN_BASE/etc
/cron.d
/prometheus
37 chmod 755 $DEBIAN_BASE/etc
/init.d
/prometheus
39 # Strip debug info from binary
40 strip
$DEBIAN_BASE/usr
/sbin
/prometheus
42 # Zmeni uzivatele a skupinu
43 chown
-R root
:root
$DEBIAN_BASE
46 find $DEBIAN_BASE -type f
-exec md5sum {} \
; >> $DEBIAN_BASE/DEBIAN
/_md5sum
47 # odstraneni $DEBIAN_BASE z adresare
48 sed -r "s:$DEBIAN_BASE::g" $DEBIAN_BASE/DEBIAN
/_md5sum
> $DEBIAN_BASE/DEBIAN
/md5sum;
49 rm $DEBIAN_BASE/DEBIAN
/_md5sum
53 cp -R $DEB_PCK_NAME.control
$DEBIAN_BASE/DEBIAN
/control
54 if [ -f $DEB_PCK_NAME'.postinst' ]; then
55 cp -R $DEB_PCK_NAME.postinst
$DEBIAN_BASE/DEBIAN
/postinst
57 if [ -f $DEB_PCK_NAME'.preinst' ]; then
58 cp -R $DEB_PCK_NAME.preinst
$DEBIAN_BASE/DEBIAN
/preinst
60 if [ -f $DEB_PCK_NAME'.conffiles' ]; then
61 cp -R $DEB_PCK_NAME.conffiles
$DEBIAN_BASE/DEBIAN
/conffiles
63 if [ -f $DEB_PCK_NAME'.prerm' ]; then
64 cp -R $DEB_PCK_NAME.prerm
$DEBIAN_BASE/DEBIAN
/prerm
66 if [ -f $DEB_PCK_NAME'.postrm' ]; then
67 cp -R $DEB_PCK_NAME.postrm
$DEBIAN_BASE/DEBIAN
/postrm
71 for f
in `find $DEBIAN_BASE/etc -path ".svn*"`
76 # Momentalne se nepouziva
77 #SIZEDU=`du -sk "$DEBIAN_BASE" | awk '{ print $1}'`
78 #SIZEDIR=`find "$DEBIAN_BASE" -type d | wc | awk '{print $1}'`
79 #SIZE=$[ $SIZEDU - $SIZEDIR ]
82 VERSION
=`grep "const char \*version" prometheus.c|cut -f 2 -d \"`
85 sed -e "s/__VERSION__/$VERSION/" \
86 -e "s/__PACKAGE__/$DEB_PCK_NAME/" \
87 -e "s/__MAINTAINER__/$MAINTAINER/" \
88 -e "s/__ARCHITECTURE__/$ARCHITECTURE/" \
89 $DEB_PCK_NAME.control
> $DEBIAN_BASE/DEBIAN
/control
91 # Vytvori a prejmenuje balicek
92 dpkg
--build $DEBIAN_BASE
93 dpkg-name
-o $DEBIAN_BASE.deb
This page took 0.298937 seconds and 4 git commands to generate.