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
= \
66 SNMP_TRANSPORTS_INCLUDED
= Callback UDP
68 SNMP_TRANSPORTS_EXCLUDED
= TCP TCPv6 UDPv6 Unix
70 PKG_CONFIGURE_OPTIONS
= \
73 --with-endianness
=little \
74 --with-logfile
=/var
/log
/snmpd.log \
75 --with-persistent-directory
=/usr
/lib
/snmp
/ \
76 --with-default-snmp-version
=1 \
77 --with-sys-contact
=root@localhost \
78 --with-sys-location
=Unknown \
79 --enable-applications \
83 --disable-mib-loading \
86 --with-out-mib-modules
="$(SNMP_MIB_MODULES_EXCLUDED)" \
87 --with-mib-modules
="$(SNMP_MIB_MODULES_INCLUDED)" \
88 --with-out-transports
="$(SNMP_TRANSPORTS_EXCLUDED)" \
89 --with-transports
="$(SNMP_TRANSPORTS_INCLUDED)" \
90 --without-opaque-special-types \
96 include $(TOPDIR
)/package
/rules.mk
98 $(eval
$(call PKG_template
,LIBNETSNMP
,libnetsnmp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
99 $(eval
$(call PKG_template
,SNMPD
,snmpd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
100 $(eval
$(call PKG_template
,SNMPD_STATIC
,snmpd-static
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
101 $(eval
$(call PKG_template
,SNMP_UTILS
,snmp-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
103 $(PKG_BUILD_DIR
)/.configured
:
104 ( cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
}; \
105 $(TARGET_CONFIGURE_OPTS
) \
106 CFLAGS
="$(TARGET_CFLAGS)" \
107 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
108 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
109 ac_cv_header_pcap_h
=no \
111 --target
=$(GNU_TARGET_NAME
) \
112 --host
=$(GNU_TARGET_NAME
) \
113 --build
=$(GNU_HOST_NAME
) \
114 --program-prefix
="" \
115 --program-suffix
="" \
119 --datadir=/usr
/share \
120 --includedir=/usr
/include \
121 --infodir=/usr
/share
/info \
123 --libexecdir
=/usr
/lib \
124 --localstatedir
=/var \
125 --mandir=/usr
/share
/man \
126 --sbindir
=/usr
/sbin \
128 $(DISABLE_LARGEFILE
) \
130 $(PKG_CONFIGURE_OPTIONS
) \
134 $(PKG_BUILD_DIR
)/.built
:
135 rm -rf
$(PKG_INSTALL_DIR
)
136 mkdir
-p
$(PKG_INSTALL_DIR
)
137 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
138 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
140 ( cd
$(PKG_INSTALL_DIR
); mv .
/usr
/sbin
/snmpd .
/usr
/sbin
/snmpd-shared
; )
141 ifneq ($(BR2_PACKAGE_SNMPD_STATIC
),)
142 ( cd
$(PKG_BUILD_DIR
); rm -f agent
/snmpd
; )
143 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
144 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -static" \
145 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
147 ( cd
$(PKG_INSTALL_DIR
); mv .
/usr
/sbin
/snmpd .
/usr
/sbin
/snmpd-static
; )
152 install -d
-m0755
$(IDIR_LIBNETSNMP
)/usr
/lib
153 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.so.
* $(IDIR_LIBNETSNMP
)/usr
/lib
/
154 $(RSTRIP
) $(IDIR_LIBNETSNMP
)
155 $(IPKG_BUILD
) $(IDIR_LIBNETSNMP
) $(PACKAGE_DIR
)
158 install -d
-m0755
$(IDIR_SNMPD
)/etc
/snmp
159 install -m0644 .
/files
/snmpd.conf
$(IDIR_SNMPD
)/etc
/snmp
/snmpd.conf
160 install -d
-m0755
$(IDIR_SNMPD
)/etc
/default
161 install -m0644 .
/files
/snmpd.default
$(IDIR_SNMPD
)/etc
/default
/snmpd
162 install -d
-m0755
$(IDIR_SNMPD
)/etc
/init.d
163 install -m0755 .
/files
/snmpd.init
$(IDIR_SNMPD
)/etc
/init.d
/snmpd
164 install -d
-m0755
$(IDIR_SNMPD
)/usr
/sbin
165 install -m0755
$(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd-shared
$(IDIR_SNMPD
)/usr
/sbin
/snmpd
166 $(RSTRIP
) $(IDIR_SNMPD
)
167 $(IPKG_BUILD
) $(IDIR_SNMPD
) $(PACKAGE_DIR
)
169 $(IPKG_SNMPD_STATIC
):
170 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/etc
/snmp
171 install -m0644 .
/files
/snmpd.conf
$(IDIR_SNMPD_STATIC
)/etc
/snmp
/snmpd.conf
172 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/etc
/default
173 install -m0644 .
/files
/snmpd.default
$(IDIR_SNMPD_STATIC
)/etc
/default
/snmpd
174 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/etc
/init.d
175 install -m0755 .
/files
/snmpd.init
$(IDIR_SNMPD_STATIC
)/etc
/init.d
/snmpd
176 install -d
-m0755
$(IDIR_SNMPD_STATIC
)/usr
/sbin
177 install -m0755
$(PKG_INSTALL_DIR
)/usr
/sbin
/snmpd-static
$(IDIR_SNMPD_STATIC
)/usr
/sbin
/snmpd
178 $(RSTRIP
) $(IDIR_SNMPD_STATIC
)
179 $(IPKG_BUILD
) $(IDIR_SNMPD_STATIC
) $(PACKAGE_DIR
)
182 install -d
-m0755
$(IDIR_SNMP_UTILS
)/usr
/bin
183 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/snmp
{get,set
,status
,test,trap
,walk
} $(IDIR_SNMP_UTILS
)/usr
/bin
/
184 $(RSTRIP
) $(IDIR_SNMP_UTILS
)
185 $(IPKG_BUILD
) $(IDIR_SNMP_UTILS
) $(PACKAGE_DIR
)
187 $(STAGING_DIR
)/usr
/lib
/libnetsnmp.so
: $(PKG_BUILD_DIR
)/.built
188 mkdir
-p
$(STAGING_DIR
)/usr
/bin
189 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/net-snmp-config
$(STAGING_DIR
)/usr
/bin
/
190 mkdir
-p
$(STAGING_DIR
)/usr
/include
191 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/net-snmp
$(STAGING_DIR
)/usr
/include/
192 mkdir
-p
$(STAGING_DIR
)/usr
/lib
193 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
196 install-dev
: $(STAGING_DIR
)/usr
/lib
/libnetsnmp.so
200 $(STAGING_DIR
)/usr
/bin
/net-snmp-config \
201 $(STAGING_DIR
)/usr
/include/net-snmp \
202 $(STAGING_DIR
)/usr
/lib
/libnetsnmp
{,agent
,helpers
,mibs
}.
{a
,so
*} \
204 compile-targets
: install-dev
205 clean-targets
: uninstall-dev