Standardize package Config.in, change prompt to package name + short description
[openwrt.git] / package / net-snmp / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=net-snmp
6 PKG_VERSION:=5.1.2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=8080555ab3f90011f25d5122042d9a8d
9
10 PKG_SOURCE_URL:=@SF/net-snmp
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 SNMP_MIB_MODULES_INCLUDED = \
18 host/hr_device \
19 host/hr_disk \
20 host/hr_filesys \
21 host/hr_network \
22 host/hr_partition \
23 host/hr_proc \
24 host/hr_storage \
25 host/hr_system \
26 ieee802dot11 \
27 mibII/at \
28 mibII/icmp \
29 mibII/interfaces \
30 mibII/ip \
31 mibII/snmp_mib \
32 mibII/sysORTable \
33 mibII/system_mib \
34 mibII/tcp \
35 mibII/udp \
36 mibII/vacm_context \
37 mibII/vacm_vars \
38 snmpv3/snmpEngine \
39 snmpv3/snmpMPDStats \
40 snmpv3/usmStats \
41 snmpv3/usmUser \
42 snmpv3mibs \
43 tunnel \
44 ucd-snmp/loadave \
45 ucd-snmp/memory \
46 ucd-snmp/proc \
47 ucd-snmp/vmstat \
48 util_funcs \
49 utilities/execute \
50
51 SNMP_MIB_MODULES_EXCLUDED = \
52 agent_mibs \
53 agentx \
54 host \
55 mibII \
56 notification \
57 snmpv3mibs \
58 target \
59 ucd_snmp \
60 utilities \
61
62 SNMP_TRANSPORTS_INCLUDED = UDP
63
64 SNMP_TRANSPORTS_EXCLUDED = Callback TCP TCPv6 UDPv6 Unix
65
66 PKG_CONFIGURE_OPTIONS = \
67 --enable-shared \
68 --enable-static \
69 --with-endianness=little \
70 --with-logfile=/var/log/snmpd.log \
71 --with-persistent-directory=/usr/lib/snmp/ \
72 --with-default-snmp-version=1 \
73 --with-sys-contact=root@localhost \
74 --with-sys-location=Unknown \
75 --enable-applications \
76 --disable-debugging \
77 --disable-ipv6 \
78 --disable-manuals \
79 --disable-mib-loading \
80 --disable-mibs \
81 --disable-scripts \
82 --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \
83 --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \
84 --with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \
85 --with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \
86 --without-opaque-special-types \
87 --without-openssl \
88 --without-libwrap \
89 --without-rpm \
90 --without-zlib \
91
92 include $(TOPDIR)/package/rules.mk
93
94 $(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
95 $(eval $(call PKG_template,SNMPD,snmpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
96 $(eval $(call PKG_template,SNMP_UTILS,snmp-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
97
98 $(PKG_BUILD_DIR)/.configured:
99 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
100 $(TARGET_CONFIGURE_OPTS) \
101 CFLAGS="$(TARGET_CFLAGS)" \
102 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
103 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
104 ac_cv_header_pcap_h=no \
105 ./configure \
106 --target=$(GNU_TARGET_NAME) \
107 --host=$(GNU_TARGET_NAME) \
108 --build=$(GNU_HOST_NAME) \
109 --program-prefix="" \
110 --program-suffix="" \
111 --prefix=/usr \
112 --exec-prefix=/usr \
113 --bindir=/usr/bin \
114 --datadir=/usr/share \
115 --includedir=/usr/include \
116 --infodir=/usr/share/info \
117 --libdir=/usr/lib \
118 --libexecdir=/usr/lib \
119 --localstatedir=/var \
120 --mandir=/usr/share/man \
121 --sbindir=/usr/sbin \
122 --sysconfdir=/etc \
123 $(DISABLE_LARGEFILE) \
124 $(DISABLE_NLS) \
125 $(PKG_CONFIGURE_OPTIONS) \
126 );
127 touch $@
128
129 $(PKG_BUILD_DIR)/.built:
130 rm -rf $(PKG_INSTALL_DIR)
131 mkdir -p $(PKG_INSTALL_DIR)
132 $(MAKE) -C $(PKG_BUILD_DIR) \
133 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
134 all install
135 touch $@
136
137 $(IPKG_LIBNETSNMP):
138 install -d -m0755 $(IDIR_LIBNETSNMP)/usr/lib
139 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(IDIR_LIBNETSNMP)/usr/lib/
140 $(RSTRIP) $(IDIR_LIBNETSNMP)
141 $(IPKG_BUILD) $(IDIR_LIBNETSNMP) $(PACKAGE_DIR)
142
143 $(IPKG_SNMPD):
144 install -d -m0755 $(IDIR_SNMPD)/etc/snmp
145 install -m0644 ./files/snmpd.conf $(IDIR_SNMPD)/etc/snmp/snmpd.conf
146 install -d -m0755 $(IDIR_SNMPD)/etc/default
147 install -m0644 ./files/snmpd.default $(IDIR_SNMPD)/etc/default/snmpd
148 install -d -m0755 $(IDIR_SNMPD)/etc/init.d
149 install -m0755 ./files/snmpd.init $(IDIR_SNMPD)/etc/init.d/snmpd
150 install -d -m0755 $(IDIR_SNMPD)/usr/sbin
151 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(IDIR_SNMPD)/usr/sbin/
152 $(RSTRIP) $(IDIR_SNMPD)
153 $(IPKG_BUILD) $(IDIR_SNMPD) $(PACKAGE_DIR)
154
155 $(IPKG_SNMP_UTILS):
156 install -d -m0755 $(IDIR_SNMP_UTILS)/usr/bin
157 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,walk} $(IDIR_SNMP_UTILS)/usr/bin/
158 $(RSTRIP) $(IDIR_SNMP_UTILS)
159 $(IPKG_BUILD) $(IDIR_SNMP_UTILS) $(PACKAGE_DIR)
This page took 0.060437 seconds and 5 git commands to generate.