3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=8080555ab3f90011f25d5122042d9a8d
10 PKG_SOURCE_URL
:=@SF
/net-snmp
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 SNMP_MIB_MODULES_INCLUDED
= \
51 SNMP_MIB_MODULES_EXCLUDED
= \
62 SNMP_TRANSPORTS_INCLUDED
= UDP
64 SNMP_TRANSPORTS_EXCLUDED
= Callback TCP TCPv6 UDPv6 Unix
66 PKG_CONFIGURE_OPTIONS
= \
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 \
79 --disable-mib-loading \
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 \
92 include $(TOPDIR
)/package
/rules.mk
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
)))
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 \
106 --target
=$(GNU_TARGET_NAME
) \
107 --host
=$(GNU_TARGET_NAME
) \
108 --build
=$(GNU_HOST_NAME
) \
109 --program-prefix
="" \
110 --program-suffix
="" \
114 --datadir=/usr
/share \
115 --includedir=/usr
/include \
116 --infodir=/usr
/share
/info \
118 --libexecdir
=/usr
/lib \
119 --localstatedir
=/var \
120 --mandir=/usr
/share
/man \
121 --sbindir
=/usr
/sbin \
123 $(DISABLE_LARGEFILE
) \
125 $(PKG_CONFIGURE_OPTIONS
) \
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)" \
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
)
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
)
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
)