[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building pptpd for kfreebsd



Hi again,

Does my attached patch seem any good to you?

(Tested and seems to work as intended on linux/kfreebsd amd64).

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
diff -Nru pptpd-1.3.4.orig/debian/control pptpd-1.3.4/debian/control
--- pptpd-1.3.4.orig/debian/control	2013-02-07 21:58:09.000000000 +0000
+++ pptpd-1.3.4/debian/control	2013-02-07 21:21:59.514391418 +0000
@@ -7,14 +7,14 @@
 
 Package: pptpd
 Architecture: any
-Depends: ${shlibs:Depends}, ppp (>=2.4.5-3), netbase, debconf | debconf-2.0, bcrelay
+Depends: ${shlibs:Depends}, ppp (>=2.4.5-3), netbase, debconf | debconf-2.0, bcrelay [linux-any]
 Description: PoPToP Point to Point Tunneling Server
  This implements a Virtual Private Networking Server (VPN) that is compatible
  with Microsoft VPN clients. It allows windows users to connect to an
  internal firewalled network using their dialup.
 
 Package: bcrelay
-Architecture: any
+Architecture: linux-any
 Replaces: pptpd (<<1.2.3-1)
 Depends: ${shlibs:Depends}
 Description: Broadcast relay daemon
diff -Nru pptpd-1.3.4.orig/debian/rules pptpd-1.3.4/debian/rules
--- pptpd-1.3.4.orig/debian/rules	2013-02-07 21:58:09.000000000 +0000
+++ pptpd-1.3.4/debian/rules	2013-02-07 21:57:05.654409164 +0000
@@ -12,13 +12,20 @@
 
 export DH_COMPAT=4
 
+DEB_HOST_ARCH_OS  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+	confflags += --enable-bcrelay
+else
+	confflags += --disable-bcrelay
+endif
+
 build: build-stamp
 build-stamp:
 	dh_testdir
 
 	autoreconf
 	./configure --prefix=/usr --mandir=/usr/share/man \
-		    --with-libwrap --enable-bcrelay
+		    --with-libwrap $(confflags)
 	# Add here commands to compile the package.
 	$(MAKE) 
 
@@ -47,8 +54,10 @@
 	cp debian/pptpd.conf `pwd`/debian/pptpd/etc
 	cp debian/pptpd-options `pwd`/debian/pptpd/etc/ppp
 	#cp debian/pptpdconfig.pl `pwd`/debian/tmp/usr/sbin
+ifeq ($(DEB_HOST_ARCH_OS),linux)
 	# split bcrelay into its own package
 	mv debian/pptpd/usr/sbin/bcrelay debian/bcrelay/usr/sbin
+endif
 	
 	touch install-stamp
 
--- pptpd-1.3.4.orig/Makefile.am	2013-02-07 21:58:09.000000000 +0000
+++ pptpd-1.3.4/Makefile.am	2013-02-07 22:02:45.717421863 +0000
@@ -32,8 +32,8 @@
 debian/po/POTFILES.in debian/po/fr.po debian/po/pt_BR.po \
 debian/po/templates.pot
 
-EXTRA_PROGRAMS = 
-sbin_PROGRAMS = pptpd pptpctrl bcrelay
+EXTRA_PROGRAMS = bcrelay
+sbin_PROGRAMS = pptpd pptpctrl $(XTRA_PROG)
 
 # Header files are only used to determine what to put in a distribution, not
 # for dependencies, so just attribute them all to pptpd.

Reply to: