e6cff66d099bf37b0fb6799f6328a746bdf4880e
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
17 mkdir
-p $DEBIAN_BASE/etc
18 mkdir
-p $DEBIAN_BASE/etc
/cron.d
19 mkdir
-p $DEBIAN_BASE/etc
/prometheus
21 mkdir
-p $DEBIAN_BASE/DEBIAN
22 chmod 0755 $DEBIAN_BASE/DEBIAN
24 if ! [ -x prometheus
]; then
29 cp prometheus
$DEBIAN_BASE/usr
/sbin
30 cp prometheus
.1 $DEBIAN_BASE/usr
/share
/man
/man1
31 cp prometheus.conf
.5 $DEBIAN_BASE/usr
/share
/man
/man5
32 cp sample-configuration
/prometheus.cron
$DEBIAN_BASE/etc
/cron.d
/prometheus
33 cp sample-configuration
/prometheus.conf
$DEBIAN_BASE/etc
/prometheus
34 cp sample-configuration
/hosts
$DEBIAN_BASE/etc
/prometheus
36 # Strip debug info from binary
37 strip
$DEBIAN_BASE/usr
/sbin
/prometheus
39 # Zmeni uzivatele a skupinu
40 chown
-R root
:root
$DEBIAN_BASE
43 find $DEBIAN_BASE -type f
-exec md5sum {} \
; >> $DEBIAN_BASE/DEBIAN
/_md5sum
44 # odstraneni $DEBIAN_BASE z adresare
45 sed -r "s:$DEBIAN_BASE::g" $DEBIAN_BASE/DEBIAN
/_md5sum
> $DEBIAN_BASE/DEBIAN
/md5sum;
46 rm $DEBIAN_BASE/DEBIAN
/_md5sum
50 cp -R $DEB_PCK_NAME.control
$DEBIAN_BASE/DEBIAN
/control
51 if [ -f $DEB_PCK_NAME'.postinst' ]; then
52 cp -R $DEB_PCK_NAME.postinst
$DEBIAN_BASE/DEBIAN
/postinst
54 if [ -f $DEB_PCK_NAME'.preinst' ]; then
55 cp -R $DEB_PCK_NAME.preinst
$DEBIAN_BASE/DEBIAN
/preinst
57 if [ -f $DEB_PCK_NAME'.conffiles' ]; then
58 cp -R $DEB_PCK_NAME.conffiles
$DEBIAN_BASE/DEBIAN
/conffiles
60 if [ -f $DEB_PCK_NAME'.prerm' ]; then
61 cp -R $DEB_PCK_NAME.prerm
$DEBIAN_BASE/DEBIAN
/prerm
63 if [ -f $DEB_PCK_NAME'.postrm' ]; then
64 cp -R $DEB_PCK_NAME.postrm
$DEBIAN_BASE/DEBIAN
/postrm
68 #for f in `find $DEBIAN_BASE -path ".svn*"`
70 # rm -R $f 2>/dev/null
73 # Momentalne se nepouziva
74 #SIZEDU=`du -sk "$DEBIAN_BASE" | awk '{ print $1}'`
75 #SIZEDIR=`find "$DEBIAN_BASE" -type d | wc | awk '{print $1}'`
76 #SIZE=$[ $SIZEDU - $SIZEDIR ]
79 VERSION
=`grep "const char \*version" prometheus.c|cut -f 2 -d \"`
82 sed -e "s/__VERSION__/$VERSION/" \
83 -e "s/__PACKAGE__/$DEB_PCK_NAME/" \
84 -e "s/__MAINTAINER__/$MAINTAINER/" \
85 -e "s/__ARCHITECTURE__/$ARCHITECTURE/" \
86 $DEB_PCK_NAME.control
> $DEBIAN_BASE/DEBIAN
/control
88 # Vytvori a prejmenuje balicek
89 dpkg
--build $DEBIAN_BASE
90 dpkg-name
-o $DEBIAN_BASE.deb
This page took 0.288421 seconds and 3 git commands to generate.