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
= \
54 SNMP_MIB_MODULES_EXCLUDED
= \
65 SNMP_TRANSPORTS_INCLUDED
= UDP
67 SNMP_TRANSPORTS_EXCLUDED
= Callback TCP TCPv6 UDPv6 Unix
69 PKG_CONFIGURE_OPTIONS
= \
72 --with-endianness
=little \
73 --with-logfile
=/var
/log
/snmpd.log \
74 --with-persistent-directory
=/usr
/lib
/snmp
/ \
75 --with-default-snmp-version
=1 \
76 --with-sys-contact
=root@localhost \
77 --with-sys-location
=Unknown \
78 --enable-applications \
82 --disable-mib-loading \
85 --with-out-mib-modules
="$(SNMP_MIB_MODULES_EXCLUDED)" \
86 --with-mib-modules
="$(SNMP_MIB_MODULES_INCLUDED)" \
87 --with-out-transports
="$(SNMP_TRANSPORTS_EXCLUDED)" \
88 --with-transports
="$(SNMP_TRANSPORTS_INCLUDED)" \
89 --without-opaque-special-types \
95 include $(TOPDIR
)/package
/rules.mk
97 $(eval
$(call PKG_template
,LIBNETSNMP
,libnetsnmp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
98 $(eval
$(call PKG_template
,SNMPD
,snmpd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
99 $(eval
$(call PKG_template
,SNMP_UTILS
,snmp-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
101 $(PKG_BUILD_DIR
)/.configured
:
102 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
103 $(TARGET_CONFIGURE_OPTS
) \
104 CFLAGS
="$(TARGET_CFLAGS)" \
105 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
106 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
107 ac_cv_header_pcap_h
=no \
109 --target
=$(GNU_TARGET_NAME
) \
110 --host
=$(GNU_TARGET_NAME
) \
111 --build
=$(GNU_HOST_NAME
) \
112 --program-prefix
="" \
113 --program-suffix
="" \
117 --datadir=/usr
/share \
118 --includedir=/usr
/include \
119 --infodir=/usr
/share
/info \
121 --libexecdir
=/usr
/lib \
122 --localstatedir
=/var \
123 --mandir=/usr
/share
/man \
124 --sbindir
=/usr
/sbin \
126 $(DISABLE_LARGEFILE
) \
128 $(PKG_CONFIGURE_OPTIONS
) \
132 $(PKG_BUILD_DIR
)/.built
:
133 rm -rf
$(PKG_INSTALL_DIR
)
134 mkdir
-p
$(PKG_INSTALL_DIR
)
135 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
136 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
141 install -d
-m0755
$(IDIR_LIBNETSNMP
)/usr
/lib
142 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.so.
* $(IDIR_LIBNETSNMP
)/usr
/lib
/
143 $(RSTRIP
) $(IDIR_LIBNETSNMP
)
144 $(IPKG_BUILD
) $(IDIR_LIBNETSNMP
) $(PACKAGE_DIR
)
147 install -d
-m0755
$(IDIR_SNMPD
)/etc
/snmp
148 install -m0644 .
/files
/snmpd.conf
$(IDIR_SNMPD
)/etc
/snmp
/snmpd.conf
149 install -d
-m0755
$(IDIR_SNMPD
)/etc
/default
150 install -m0644 .
/files
/snmpd.default
$(IDIR_SNMPD
)/etc
/default
/snmpd
151 install -d
-m0755
$(IDIR_SNMPD
)/etc
/init.d
152 install -m0755 .
/files
/snmpd.init
$(IDIR_SNMPD
)/etc
/init.d
/snmpd
153 install -d
-m0755
$(IDIR_SNMPD
)/usr
/sbin
154 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd
$(IDIR_SNMPD
)/usr
/sbin
/
155 $(RSTRIP
) $(IDIR_SNMPD
)
156 $(IPKG_BUILD
) $(IDIR_SNMPD
) $(PACKAGE_DIR
)
159 install -d
-m0755
$(IDIR_SNMP_UTILS
)/usr
/bin
160 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/snmp
{get,set
,status
,test,trap
,walk
} $(IDIR_SNMP_UTILS
)/usr
/bin
/
161 $(RSTRIP
) $(IDIR_SNMP_UTILS
)
162 $(IPKG_BUILD
) $(IDIR_SNMP_UTILS
) $(PACKAGE_DIR
)
164 $(STAGING_DIR
)/usr
/lib
/libnetsnmp.so
: $(PKG_BUILD_DIR
)/.built
165 mkdir
-p
$(STAGING_DIR
)/usr
/bin
166 cp
-fp
$(PKG_INSTALL_DIR
)/usr
/bin
/net-snmp-config
$(STAGING_DIR
)/usr
/bin
/
167 mkdir
-p
$(STAGING_DIR
)/usr
/include
168 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/net-snmp
$(STAGING_DIR
)/usr
/include/
169 mkdir
-p
$(STAGING_DIR
)/usr
/lib
170 cp
-fp
$(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
173 install-dev
: $(STAGING_DIR
)/usr
/lib
/libnetsnmp.so
177 $(STAGING_DIR
)/usr
/bin
/net-snmp-config \
178 $(STAGING_DIR
)/usr
/include/net-snmp \
179 $(STAGING_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} \