2 # given source tree build .tar.gz and package for distribution on this host
5 if [ -f /etc
/redhat-release
]; then
7 DVER
=$
(cat /etc
/redhat-release | cut
-d " " -f5-)
8 elif [ -f /etc
/SuSE-release
]; then
10 DVER
=$
(cat /etc
/SuSE-release |
head -n1 | cut
-d " " -f3)
11 elif [ -f /etc
/debian_version
]; then
13 DVER
=$
(cat /etc
/debian_version
)
20 if [ "$DISTRO" == "RedHat" ]; then
21 mkdir
-p /tmp
/pptpd-
$version
22 cp -ar * /tmp
/pptpd-
$version/
24 tar -czf /usr
/src
/redhat
/SOURCES
/pptpd-
$version.
tar.gz pptpd-
$version
26 rpmbuild
-ba pptpd.spec
27 elif [ "$DISTRO" == "Debian" ]; then
28 DPKG_BP
=`which dpkg-buildpackage 2>/dev/null`
29 if [ -z "$DPKG_BP" ]; then
30 echo "dpkg-buildpackage not installed. Do: apt-get install dpkg-dev"
35 echo "No packagebuilder implemented yet."