File: makedeb.sh

package info (click to toggle)
backintime 1.0.36-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 3,284 kB
  • sloc: python: 10,536; sh: 444; xml: 157; makefile: 138
file content (30 lines) | stat: -rwxr-xr-x 778 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

for i in common notify gnome kde4; do
	PKGNAME=`cat $i/debian_specific/control | grep "^Package:" | cut -d" " -f2`
	PKGVER=`cat $i/debian_specific/control | grep "^Version:" | cut -d" " -f2`
	PKGARCH=`cat $i/debian_specific/control | grep "^Architecture:" | cut -d" " -f2`

	echo $PKGNAME $PKGVER $PKGARCH

	rm -rf tmp
	mkdir -p tmp

	cd $i
	./configure $@
	make DESTDIR=../tmp install
	cd ..

	#update control
	mkdir -p tmp/DEBIAN
	cp $i/debian_specific/control tmp/DEBIAN/control
	echo "Installed-Size: `du -sk tmp | cut -f1`" >> tmp/DEBIAN/control
	
	cp $i/debian_specific/postrm tmp/DEBIAN/postrm
	[ -e $i/debian_specific/conffiles ] && cp $i/debian_specific/conffiles tmp/DEBIAN/conffiles

	dpkg --build tmp/ $PKGNAME-${PKGVER}_$PKGARCH.deb

	rm -rf tmp
done