-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_package
executable file
·37 lines (30 loc) · 1.29 KB
/
build_package
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
################################################################################
#
# Common code to unpack and build the source debian
#
#
#echo "unpacking $DEBORIG.tar.gz:"
#tar xvf $DEBORIG.tar.gz
echo "Ready to build..."
pushd ${DEBNAME}
echo "Clear CFLAGS etc, so that debian rules will set them up"
unset CPPFLAGS
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
#
# call pdebuild for your distro:
#
echo "pdebuild amd64 package..."
pdebuild --architecture amd64 --buildresult /var/cache/pbuilder/$DISTRO-amd64-result -- --basetgz /var/cache/pbuilder/$DISTRO-amd64-base.tgz --debbuildopts " -j4 "
if [ "$?" -ne 0 ]; then bailout "pdebuild of amd64 package"; fi
echo "pdebuild i386 package..."
pdebuild --architecture i386 --buildresult /var/cache/pbuilder/$DISTRO-i386-result -- --basetgz /var/cache/pbuilder/$DISTRO-i386-base.tgz --debbuildopts " -j4 "
if [ "$?" -ne 0 ]; then bailout "pdebuild of i386 package"; fi
echo "build_package done. Look in /var/cache/pbuilder/$DISTRO-[i386|amd64]-result/ for the debs"
popd
# Lastly debsign the source (has to go here, after the package is
# built so that the _source.changes file exists):
echo "Calling debsign"
debsign -S -k"$PACKAGE_MAINTAINER_GPG_KEYID" ${PROGRAM_NAME}_${NEWDEBVERSION}_source.changes
if [ "$?" -ne 0 ]; then bailout "Signing of source.changes file"; fi