strip pppd
[buildroot.git] / package / pppd / pppd.mk
blob8bc5e79940839522620ba8084d0ce4f6c315c197
1 #############################################################
3 # pppd
5 #############################################################
6 PPPD_VERSION:=2.4.4
7 PPPD_SOURCE:=ppp-$(PPPD_VERSION).tar.gz
8 PPPD_SITE:=ftp://ftp.samba.org/pub/ppp
9 PPPD_DIR:=$(BUILD_DIR)/ppp-$(PPPD_VERSION)
10 PPPD_CAT:=$(ZCAT)
11 PPPD_BINARY:=pppd/pppd
12 PPPD_TARGET_BINARY:=usr/sbin/pppd
15 $(DL_DIR)/$(PPPD_SOURCE):
16 $(WGET) -P $(DL_DIR) $(PPPD_SITE)/$(PPPD_SOURCE)
18 pppd-source: $(DL_DIR)/$(PPPD_SOURCE)
20 $(PPPD_DIR)/.unpacked: $(DL_DIR)/$(PPPD_SOURCE)
21 $(PPPD_CAT) $(DL_DIR)/$(PPPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 $(SED) 's/ -DIPX_CHANGE -DHAVE_MMAP//' $(PPPD_DIR)/pppd/Makefile.linux
23 $(SED) 's/HAVE_MULTILINK=y/#HAVE_MULTILINK=y/' $(PPPD_DIR)/pppd/Makefile.linux
24 $(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux
25 $(SED) 's,(INSTALL) -s,(INSTALL),' $(PPPD_DIR)/*/Makefile.linux
26 $(SED) 's,(INSTALL) -s,(INSTALL),' $(PPPD_DIR)/pppd/plugins/*/Makefile.linux
27 $(SED) 's/ -o root//' $(PPPD_DIR)/*/Makefile.linux
28 $(SED) 's/ -g daemon//' $(PPPD_DIR)/*/Makefile.linux
29 $(CONFIG_UPDATE) $(@D)
30 touch $@
32 $(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked
33 (cd $(PPPD_DIR); rm -rf config.cache; \
34 $(AUTO_CONFIGURE_TARGET) \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --sbindir=/usr/sbin \
39 --libdir=/lib \
40 --libexecdir=/usr/lib \
41 --sysconfdir=/etc \
42 --datadir=/usr/share \
43 --localstatedir=/var \
44 --mandir=/usr/share/man \
45 --infodir=/usr/share/info \
46 $(DISABLE_NLS) \
48 touch $@
50 $(PPPD_DIR)/$(PPPD_BINARY): $(PPPD_DIR)/.configured
51 $(MAKE) CC="$(TARGET_CC) $(TARGET_CC_FLAGS)" \
52 COPTS="$(TARGET_CFLAGS)" -C $(PPPD_DIR)
54 $(TARGET_DIR)/$(PPPD_TARGET_BINARY): $(PPPD_DIR)/$(PPPD_BINARY)
55 $(MAKE1) DESTDIR=$(TARGET_DIR)/usr \
56 CC="$(TARGET_CC) $(TARGET_CC_FLAGS)" -C $(PPPD_DIR) install
57 ifneq ($(BR2_ENABLE_LOCALE),y)
58 rm -rf $(TARGET_DIR)/usr/share/locale
59 endif
60 ifneq ($(BR2_HAVE_MANPAGES),y)
61 rm -rf $(TARGET_DIR)/usr/share/man
62 endif
63 ifneq ($(BR2_HAVE_INFOPAGES),y)
64 rm -rf $(TARGET_DIR)/usr/share/info
65 endif
66 rm -rf $(TARGET_DIR)/usr/share/doc
67 ifneq ($(BR2_HAVE_INCLUDES),y)
68 rm -rf $(TARGET_DIR)/usr/include/pppd
69 endif
70 $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/*
71 $(STRIPCMD) $(STRIP_STRIP_ALL) $@
73 pppd: $(TARGET_DIR)/$(PPPD_TARGET_BINARY)
75 pppd-clean:
76 rm -f $(TARGET_DIR)/usr/sbin/pppd
77 rm -f $(TARGET_DIR)/usr/sbin/chat
78 rm -f $(TARGET_DIR)/usr/sbin/pppstatus
79 rm -f $(TARGET_DIR)/usr/sbin/pppdump
80 rm -rf $(TARGET_DIR)/etc/ppp
81 rm -rf $(TARGET_DIR)/usr/include/pppd
82 -$(MAKE) -C $(PPPD_DIR) clean
84 pppd-dirclean:
85 rm -rf $(PPPD_DIR)
88 #############################################################
90 # Toplevel Makefile options
92 #############################################################
93 ifeq ($(BR2_PACKAGE_PPPD),y)
94 TARGETS+=pppd
95 endif