[linux-atm] make linux-atm depend on its kernel modul atm.ko
[openwrt/svn-archive/archive.git] / package / linux-atm / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=linux-atm
11 PKG_VERSION:=2.4.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
15 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/linux-atm/
16 PKG_MD5SUM:=84fef49cc39ff2605204246666f65864
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/linux-atm
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=Linux ATM library
24 DEPENDS:=+kmod-atm
25 URL:=http://linux-atm.sourceforge.net/
26 endef
27
28 define Package/linux-atm/description
29 This package contains a library for accessing the Linux ATM subsystem.
30 endef
31
32 define Package/atm-tools
33 SECTION:=net
34 CATEGORY:=Network
35 DEPENDS:=linux-atm
36 TITLE:=Linux ATM tools
37 URL:=http://linux-atm.sourceforge.net/
38 endef
39
40 define Package/atm-tools/description
41 This package contains the Linux ATM tools.
42 endef
43
44 define Build/Prepare
45 $(call Build/Prepare/Default)
46 $(INSTALL_BIN) $(SCRIPT_DIR)/config.sub $(SCRIPT_DIR)/config.guess $(PKG_BUILD_DIR)/
47 endef
48
49 define Build/Configure
50 $(call Build/Configure/Default)
51 # prevent autoheader invocation
52 touch $(PKG_BUILD_DIR)/stamp-h.in
53 endef
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 DESTDIR="$(PKG_INSTALL_DIR)" \
58 all install
59 endef
60
61 ifneq ($(CONFIG_PACKAGE_linux-atm),)
62 define Build/InstallDev
63 mkdir -p $(1)/usr/include
64 $(CP) $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h \
65 $(1)/usr/include/
66 mkdir -p $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} \
68 $(1)/usr/lib/
69 endef
70 endif
71
72 define Package/linux-atm/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.so.* $(1)/usr/lib/
75 endef
76
77 define Package/atm-tools/install
78 $(INSTALL_DIR) $(1)/usr/sbin/
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmarp{,d} $(1)/usr/sbin/
80 $(INSTALL_DIR) $(1)/lib/network
81 $(INSTALL_BIN) ./files/ipoa.sh $(1)/lib/network/
82 endef
83
84 $(eval $(call BuildPackage,linux-atm))
85 $(eval $(call BuildPackage,atm-tools))