diff options
author | Gustavo Zacarias <gustavo@zacarias.com.ar> | 2010-10-06 14:34:47 -0300 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-10-18 11:30:31 +0200 |
commit | 61e61aebce3316f55725d114240a206210188114 (patch) | |
tree | f735fd1d059a39e2a38665bdc3e137a3a0995e81 /package/pppd/pppd.mk | |
parent | d73efad3fe8d47fc3d7785a614c6369897bb5192 (diff) | |
download | buildroot-novena-61e61aebce3316f55725d114240a206210188114.tar.gz buildroot-novena-61e61aebce3316f55725d114240a206210188114.zip |
pppd: convert to gentargets, properly add radius support, fix l2tp for 2.6.35 headers
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/pppd/pppd.mk')
-rw-r--r-- | package/pppd/pppd.mk | 77 |
1 files changed, 54 insertions, 23 deletions
diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk index 35fd451d7..05c1c32c9 100644 --- a/package/pppd/pppd.mk +++ b/package/pppd/pppd.mk @@ -9,7 +9,10 @@ PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz PPPD_SITE = ftp://ftp.samba.org/pub/ppp PPPD_TARGET_BINS = chat pppd pppdump pppstats PPPD_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),chat pppd pppdump pppstats) -PPPD_MAKE = $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR) $(PPPD_MAKE_OPT) +PPPD_RADIUS_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),pppd-radattr pppd-radius) +PPPD_RADIUS_CONF = dictionary dictionary.ascend dictionary.compat \ + dictionary.merit dictionary.microsoft \ + issue port-id-map realms server radiusclient.conf ifeq ($(BR2_PACKAGE_PPPD_FILTER),y) PPPD_DEPENDENCIES += libpcap @@ -20,15 +23,56 @@ ifeq ($(BR2_INET_IPV6),y) PPPD_MAKE_OPT += HAVE_INET6=y endif -$(eval $(call AUTOTARGETS,package,pppd)) - -$(PPPD_HOOK_POST_EXTRACT): +define PPPD_CONFIGURE_CMDS $(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux $(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux - touch $@ + ( cd $(@D); ./configure ) +endef + +define PPPD_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" \ + -C $(@D) $(PPPD_MAKE_OPT) +endef + +define PPPD_UNINSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS)) + rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery + rm -rf $(TARGET_DIR)/usr/lib/pppd + rm -rf $(TARGET_DIR)/etc/ppp/radius + for m in $(PPPD_MANPAGES); do \ + rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ + done + for m in $(PPPD_RADIUS_MANPAGES); do \ + rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ + done +endef + +ifeq ($(BR2_PACKAGE_PPPD_RADIUS),y) +define PPPD_INSTALL_RADIUS + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so + for m in $(PPPD_RADIUS_CONF); do \ + $(INSTALL) -m 644 -D $(PPPD_DIR)/pppd/plugins/radius/etc/$$m \ + $(TARGET_DIR)/etc/ppp/radius/$$m; \ + done + $(SED) 's:/usr/local/etc:/etc:' \ + $(TARGET_DIR)/etc/ppp/radius/radiusclient.conf + $(SED) 's:/usr/local/sbin:/usr/sbin:' \ + $(TARGET_DIR)/etc/ppp/radius/radiusclient.conf + $(SED) 's:/etc/radiusclient:/etc/ppp/radius:g' \ + $(TARGET_DIR)/etc/ppp/radius/* + for m in $(PPPD_RADIUS_MANPAGES); do \ + $(INSTALL) -m 644 -D $(PPPD_DIR)/pppd/plugins/radius/$$m.8 \ + $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ + done +endef +endif -$(PPPD_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") +define PPPD_INSTALL_TARGET_CMDS for sbin in $(PPPD_TARGET_BINS); do \ $(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \ $(TARGET_DIR)/usr/sbin/$$sbin; \ @@ -51,24 +95,11 @@ $(PPPD_TARGET_INSTALL_TARGET): $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/openl2tp.so $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/pppol2tp.so \ $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppol2tp.so - $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \ - $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so - $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \ - $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so - $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \ - $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so + $(PPPD_INSTALL_RADIUS) for m in $(PPPD_MANPAGES); do \ $(INSTALL) -m 644 -D $(PPPD_DIR)/$$m/$$m.8 \ $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ done - touch $@ +endef -$(PPPD_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(PPPD_TARGET_BINS)) - rm -f $(TARGET_DIR)/usr/sbin/pppoe-discovery - for m in $(PPPD_MANPAGES); do \ - rm -f $(TARGET_DIR)/usr/share/man/man8/$$m.8; \ - done - rm -rf $(TARGET_DIR)/usr/lib/pppd - rm -f $(PPPD_TARGET_INSTALL_TARGET) $(PPPD_HOOK_POST_INSTALL) +$(eval $(call GENTARGETS,package,pppd)) |