add md5sum for rp-pppoe
[openwrt/svn-archive/archive.git] / net / rp-pppoe / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rp-pppoe
12 PKG_VERSION:=3.5
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=97972f8f8f6a3ab9b7070333a6a29c4b
15
16 PKG_SOURCE_URL:=http://roaringpenguin.com/penguin/pppoe/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/rp-pppoe
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+ppp
29 SUBMENU:=Roaring Penguin PPPoE (PPP over Ethernet) implementation
30 TITLE:=Roaring Penguin PPPoE (PPP over Ethernet) implementation
31 endef
32
33 define Package/rp-pppoe-client
34 $(call Package/rp-pppoe)
35 TITLE:=PPPoE (PPP over Ethernet) client
36 endef
37
38 define Package/rp-pppoe-relay
39 $(call Package/rp-pppoe)
40 TITLE:=PPPoE (PPP over Ethernet) relay
41 endef
42
43 define Package/rp-pppoe-server
44 $(call Package/rp-pppoe)
45 TITLE:=PPPoE (PPP over Ethernet) server
46 endef
47
48 define Package/rp-pppoe-sniff
49 $(call Package/rp-pppoe)
50 TITLE:=PPPoE (PPP over Ethernet) sniffer
51 endef
52
53 define Build/Configure
54 (cd $(PKG_BUILD_DIR)/src ; rm -rf config.{cache,status}; \
55 $(TARGET_CONFIGURE_OPTS) \
56 CFLAGS="$(TARGET_CFLAGS)" \
57 ac_cv_func_setvbuf_reversed=no \
58 ac_cv_sizeof_unsigned_short=2 \
59 ac_cv_sizeof_unsigned_int=4 \
60 ac_cv_sizeof_unsigned_long=4 \
61 ac_cv_linux_kernel_pppoe=yes \
62 ac_cv_pack_bitfields_reversed=yes \
63 ./configure \
64 --target=$(GNU_TARGET_NAME) \
65 --host=$(GNU_TARGET_NAME) \
66 --build=$(GNU_HOST_NAME) \
67 --program-prefix="" \
68 --program-suffix="" \
69 --prefix=/usr \
70 --exec-prefix=/usr \
71 --bindir=/usr/bin \
72 --datadir=/usr/share \
73 --includedir=/usr/include \
74 --infodir=/usr/share/info \
75 --libdir=/usr/lib \
76 --libexecdir=/usr/lib \
77 --localstatedir=/var \
78 --mandir=/usr/share/man \
79 --sbindir=/usr/sbin \
80 --sysconfdir=/etc \
81 $(DISABLE_LARGEFILE) \
82 $(DISABLE_NLS) \
83 )
84 endef
85
86 define Build/Compile
87 $(MAKE) -C $(PKG_BUILD_DIR)/src \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
89 all install
90 endef
91
92 define Package/rp-pppoe-client/install
93 install -d -m0755 $(1)/etc/init.d
94 install -m0755 ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
95 install -d -m0755 $(1)/etc/ppp
96 install -m0644 $(PKG_INSTALL_DIR)/etc/pppoe.conf $(1)/etc/
97 install -d -m0755 $(1)/usr/sbin
98 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
99 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(1)/usr/sbin/
100 endef
101
102 define Package/rp-pppoe-relay/install
103 install -d -m0755 $(1)/etc/default
104 install -m0755 ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
105 install -d -m0755 $(1)/etc/init.d
106 install -m0755 ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
107 install -d -m0755 $(1)/usr/sbin
108 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
109 endef
110
111 define Package/rp-pppoe-server/install
112 install -d -m0755 $(1)/etc/default
113 install -m0755 ./files/pppoe-server.default $(1)/etc/default/pppoe-server
114 install -d -m0755 $(1)/etc/init.d
115 install -m0755 ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
116 install -d -m0755 $(1)/etc/ppp
117 install -m0644 $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
118 install -d -m0755 $(1)/usr/sbin
119 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
120 endef
121
122 define Package/rp-pppoe-sniff/install
123 install -d -m0755 $(1)/usr/sbin
124 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
125 endef
126
127 $(eval $(call BuildPackage,rp-pppoe-client))
128 $(eval $(call BuildPackage,rp-pppoe-relay))
129 $(eval $(call BuildPackage,rp-pppoe-server))
130 $(eval $(call BuildPackage,rp-pppoe-sniff))
131