File: build_dpkg.sh.in

package info (click to toggle)
rioutil 1.4.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,980 kB
  • ctags: 777
  • sloc: sh: 11,429; ansic: 5,834; makefile: 112
file content (40 lines) | stat: -rw-r--r-- 1,168 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
31
32
33
34
35
36
37
38
39
40
#!/bin/sh

PREFIX=@prefix@
ARCH=`dpkg --print-architecture`

[ -f ../librioutil/librioutil.la ] || exit 1
[ -f ../librioutil/.libs/librioutil.so ] || exit 1
[ -f ../librioutil/.libs/librioutil.a ] || exit 1
[ -f ../src/rioutil ] || exit 1
[ -f ../src/riofck ] || exit 1
[ -f ../man/rioutil.1 ] || [ -f ../man/rioutil.1.gz ] || exit 1

echo "Building debian file for @PACKAGE@-@VERSION@ on $ARCH"

# clean out build directory
rm -rf dpkg
mkdir dpkg

# copy in control file
mkdir dpkg/DEBIAN


cp control dpkg/DEBIAN
# put architecture line into control file
echo "Architecture: $ARCH" >> dpkg/DEBIAN/control

../mkinstalldirs dpkg/$PREFIX >/dev/null
../mkinstalldirs dpkg/$PREFIX/bin >/dev/null
../mkinstalldirs dpkg/$PREFIX/lib >/dev/null
../mkinstalldirs dpkg/$PREFIX/man >/dev/null
../mkinstalldirs dpkg/$PREFIX/man/man1 >/dev/null

cp ../librioutil/librioutil.la dpkg/$PREFIX/lib
cp ../librioutil/.libs/librioutil.a dpkg/$PREFIX/lib
cp -d ../librioutil/.libs/librioutil.so* dpkg/$PREFIX/lib
cp ../src/.libs/rioutil dpkg/$PREFIX/bin
cp ../src/.libs/riofck dpkg/$PREFIX/bin
cp ../man/rioutil.1* dpkg/$PREFIX/man/man1

dpkg --build dpkg/ @PACKAGE@-@VERSION@_$ARCH.deb