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
= \
53 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
,SNMPD_STATIC
,snmpd-static
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,SNMP_UTILS
,snmp-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
102 $(PKG_BUILD_DIR
)/.configured
:
103 ( cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
}; \
104 $(TARGET_CONFIGURE_OPTS
) \
105 CFLAGS
="$(TARGET_CFLAGS)" \
106 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
107 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
108 ac_cv_header_pcap_h
=no \
110 --target
=$(GNU_TARGET_NAME
) \
111 --host
=$(GNU_TARGET_NAME
) \
112 --build
=$(GNU_HOST_NAME
) \
113 --program-prefix
="" \
114 --program-suffix
="" \
118 --datadir=/usr
/share \
119 --includedir=/usr
/include \
120 --infodir=/usr
/share
/info \
122 --libexecdir
=/usr
/lib \
123 --localstatedir
=/var \
124 --mandir=/usr
/share
/man \
125 --sbindir
=/usr
/sbin \
127 $(DISABLE_LARGEFILE
) \
129 $(PKG_CONFIGURE_OPTIONS
) \
133 $(PKG_BUILD_DIR
)/.built
:
134 rm -rf
$(PKG_INSTALL_DIR
)
135 mkdir
-p
$(PKG_INSTALL_DIR
)
136 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
137 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
139 ( cd
$(PKG_INSTALL_DIR
); mv .
/usr
/sbin
/snmpd .
/usr
/sbin
/snmpd-shared
; )
140 ifneq ($(BR2_PACKAGE_SNMPD_STATIC
),)
141 ( cd
$(PKG_BUILD_DIR
); rm -f agent
/snmpd
; )
142 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
143 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -static" \
144 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
146 ( cd
$(PKG_INSTALL_DIR
); mv .
/usr
/sbin
/snmpd .
/usr
/sbin
/snmpd-static
; )
151 install -d
-m0755
$(IDIR_LIBNETSNMP
)/usr
/lib
152 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.so.
* $(IDIR_LIBNETSNMP
)/usr
/lib
/
153 $(RSTRIP
) $(IDIR_LIBNETSNMP
)
154 $(IPKG_BUILD
) $(IDIR_LIBNETSNMP
) $(PACKAGE_DIR
)
157 install -d
-m0755
$(IDIR_SNMPD
)/etc
/snmp
158 install -m0644 .
/files
/snmpd.conf
$(IDIR_SNMPD
)/etc
/snmp
/snmpd.conf
159 install -d
-m0755
$(IDIR_SNMPD
)/etc
/default
160 install -m0644 .
/files
/snmpd.default
$(IDIR_SNMPD
)/etc
/default
/snmpd
161 install -d
-m0755
$(IDIR_SNMPD
)/etc
/init.d
162 install -m0755 .
/files
/snmpd.init
$(IDIR_SNMPD
)/etc
/init.d
/snmpd
163 install -d
-m0755
$(IDIR_SNMPD
)/usr
/sbin
164 install -m0755
$(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd-shared
$(IDIR_SNMPD
)/usr
/sbin
/snmpd
165 $(RSTRIP
) $(IDIR_SNMPD
)
166 $(IPKG_BUILD
) $(IDIR_SNMPD
) $(PACKAGE_DIR
)
168 $(IPKG_SNMPD_STATIC
):
169 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/etc
/snmp
170 install -m0644 .
/files
/snmpd.conf
$(IDIR_SNMPD_STATIC
)/etc
/snmp
/snmpd.conf
171 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/etc
/default
172 install -m0644 .
/files
/snmpd.default
$(IDIR_SNMPD_STATIC
)/etc
/default
/snmpd
173 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/etc
/init.d
174 install -m0755 .
/files
/snmpd.init
$(IDIR_SNMPD_STATIC
)/etc
/init.d
/snmpd
175 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/usr
/sbin
176 install -m0755
$(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd-static
$(IDIR_SNMPD_STATIC
)/usr
/sbin
/snmpd
177 $(RSTRIP
) $(IDIR_SNMPD_STATIC
)
178 $(IPKG_BUILD
) $(IDIR_SNMPD_STATIC
) $(PACKAGE_DIR
)
181 install -d
-m0755
$(IDIR_SNMP_UTILS
)/usr
/bin
182 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/snmp
{get,set
,status
,test,trap
,walk
} $(IDIR_SNMP_UTILS
)/usr
/bin
/
183 $(RSTRIP
) $(IDIR_SNMP_UTILS
)
184 $(IPKG_BUILD
) $(IDIR_SNMP_UTILS
) $(PACKAGE_DIR
)
186 $(STAGING_DIR
)/usr
/lib
/libnetsnmp.so
: $(PKG_BUILD_DIR
)/.built
187 mkdir
-p
$(STAGING_DIR
)/usr
/bin
188 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/net-snmp-config
$(STAGING_DIR
)/usr
/bin
/
189 mkdir
-p
$(STAGING_DIR
)/usr
/include
190 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/net-snmp
$(STAGING_DIR
)/usr
/include/
191 mkdir
-p
$(STAGING_DIR
)/usr
/lib
192 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
195 install-dev
: $(STAGING_DIR
)/usr
/lib
/libnetsnmp.so
199 $(STAGING_DIR
)/usr
/bin
/net-snmp-config \
200 $(STAGING_DIR
)/usr
/include/net-snmp \
201 $(STAGING_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} \