Changeset 9210


Ignore:
Timestamp:
2007-10-09T04:08:35+02:00 (10 years ago)
Author:
nico
Message:

[packages] net-snmp cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/libs/net-snmp/Makefile

    r9173 r9210  
    11#  
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2007 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1313PKG_RELEASE:=2.3 
    1414 
    15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    1615PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1716PKG_SOURCE_URL:=@SF/net-snmp 
    1817PKG_MD5SUM:=8080555ab3f90011f25d5122042d9a8d 
    19 PKG_CAT:=zcat 
    20  
    21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    2218 
    2319include $(INCLUDE_DIR)/package.mk 
    2420 
     21define Package/net-snmp/Default 
     22  SECTION:=net 
     23  CATEGORY:=Network 
     24  URL:=http://www.net-snmp.org/ 
     25endef 
     26 
     27define Package/net-snmp/Default/description 
     28 Simple Network Management Protocol (SNMP) is a widely used protocol for  
     29 monitoring the health and welfare of network equipment (eg. routers),  
     30 computer equipment and even devices like UPSs. Net-SNMP is a suite of  
     31 applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both  
     32 IPv4 and IPv6. 
     33endef 
     34 
     35 
    2536define Package/libnetsnmp 
     37$(call Package/net-snmp/Default) 
    2638  SECTION:=libs 
    2739  CATEGORY:=Libraries 
    2840  DEPENDS:=+libelf 
    2941  TITLE:=Open source SNMP implementation (librairies) 
    30   DESCRIPTION:=Open source SNMP (Simple Network Management Protocol) implementation (libraries).\\\ 
    31     Simple Network Management Protocol (SNMP) is a widely used \\\ 
    32     protocol for monitoring the health and welfare of network \\\ 
    33     equipment (eg. routers), computer equipment and even devices \\\ 
    34     like UPSs. Net-SNMP is a suite of applications used to implement \\\ 
    35     SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.\\\ 
    36     \\\ 
    37     This package contains shared libraries, needed by other programs. 
    38   URL:=http://www.net-snmp.org/ 
    39 endef 
     42endef 
     43 
     44define Package/libnetsnmp/description 
     45$(call Package/net-snmp/Default/description) 
     46 . 
     47 This package contains shared libraries, needed by other programs. 
     48endef 
     49 
    4050 
    4151define Package/snmp-utils 
    42   SECTION:=net 
    43   CATEGORY:=Network 
     52$(call Package/net-snmp/Default) 
    4453  DEPENDS:=+libnetsnmp 
    4554  TITLE:=Open source SNMP implementation (utilities) 
    46   DESCRIPTION:=Open source SNMP (Simple Network Management Protocol) implementation (utilities).\\\ 
    47     Simple Network Management Protocol (SNMP) is a widely used \\\ 
    48     protocol for monitoring the health and welfare of network \\\ 
    49     equipment (eg. routers), computer equipment and even devices \\\ 
    50     like UPSs. Net-SNMP is a suite of applications used to implement \\\ 
    51     SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.\\\ 
    52     \\\ 
    53     This package contains SNMP client utilities. 
    54   URL:=http://www.net-snmp.org/ 
    55 endef 
     55endef 
     56 
     57define Package/snmp-utils/description 
     58$(call Package/net-snmp/Default/description) 
     59 . 
     60 This package contains SNMP client utilities. 
     61endef 
     62 
    5663 
    5764define Package/snmpd 
    58   SECTION:=net 
    59   CATEGORY:=Network 
     65$(call Package/net-snmp/Default) 
    6066  DEPENDS:=+libnetsnmp 
    6167  TITLE:=Open source SNMP implementation (daemon) 
    62   DESCRIPTION:=Open source SNMP (Simple Network Management Protocol) implementation (daemon).\\\ 
    63     Simple Network Management Protocol (SNMP) is a widely used \\\ 
    64     protocol for monitoring the health and welfare of network \\\ 
    65     equipment (eg. routers), computer equipment and even devices \\\ 
    66     like UPSs. Net-SNMP is a suite of applications used to implement \\\ 
    67     SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.\\\ 
    68     \\\ 
    69     This package contains the SNMP agent, dynamically linked. 
    70   URL:=http://www.net-snmp.org/ 
    71 endef 
    72  
    73 define Package/snmpd/conffiles 
    74 /etc/default/snmpd 
    75 /etc/snmp/snmpd.conf 
    76 endef 
     68endef 
     69 
     70define Package/snmpd/description 
     71$(call Package/net-snmp/Default/description) 
     72 . 
     73 This package contains the SNMP agent, dynamically linked. 
     74endef 
     75 
    7776 
    7877define Package/snmpd-static 
    79   SECTION:=net 
    80   CATEGORY:=Network 
     78$(call Package/net-snmp/Default) 
    8179  TITLE:=Open source SNMP implementation (daemon) 
    82   DESCRIPTION:=Open source SNMP (Simple Network Management Protocol) implementation (daemon).\\\ 
    83     Simple Network Management Protocol (SNMP) is a widely used \\\ 
    84     protocol for monitoring the health and welfare of network \\\ 
    85     equipment (eg. routers), computer equipment and even devices \\\ 
    86     like UPSs. Net-SNMP is a suite of applications used to implement \\\ 
    87     SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.\\\ 
    88     \\\ 
    89     This package contains the SNMP agent, statically linked. 
    90   URL:=http://www.net-snmp.org/ 
    91 endef 
    92  
    93 define Package/snmpd-static/conffiles 
    94 /etc/default/snmpd 
    95 /etc/snmp/snmpd.conf 
    96 endef 
     80endef 
     81 
     82define Package/snmpd-static/description 
     83$(call Package/net-snmp/Default/description) 
     84 . 
     85 This package contains the SNMP agent, statically linked. 
     86endef 
     87 
    9788 
    9889SNMP_MIB_MODULES_INCLUDED = \ 
     
    149140SNMP_TRANSPORTS_EXCLUDED = TCP TCPv6 UDPv6 Unix 
    150141 
    151 PKG_CONFIGURE_OPTIONS = \ 
     142CONFIGURE_ARGS += \ 
    152143        --enable-shared \ 
    153144        --enable-static \ 
     
    173164        --without-zlib \ 
    174165 
    175 define Build/Configure 
    176         (cd $(PKG_BUILD_DIR); rm -f config.cache; \ 
    177                 $(TARGET_CONFIGURE_OPTS) \ 
    178                 CFLAGS="$(TARGET_CFLAGS)" \ 
    179                 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ 
    180                 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ 
    181                 ac_cv_header_pcap_h=no \ 
    182                 ./configure \ 
    183                         --target=$(GNU_TARGET_NAME) \ 
    184                         --host=$(GNU_TARGET_NAME) \ 
    185                         --build=$(GNU_HOST_NAME) \ 
    186                         --program-prefix="" \ 
    187                         --program-suffix="" \ 
    188                         --prefix=/usr \ 
    189                         --exec-prefix=/usr \ 
    190                         --bindir=/usr/bin \ 
    191                         --datadir=/usr/share \ 
    192                         --includedir=/usr/include \ 
    193                         --infodir=/usr/share/info \ 
    194                         --libdir=/usr/lib \ 
    195                         --libexecdir=/usr/lib \ 
    196                         --localstatedir=/var \ 
    197                         --mandir=/usr/share/man \ 
    198                         --sbindir=/usr/sbin \ 
    199                         --sysconfdir=/etc \ 
    200                         $(DISABLE_LARGEFILE) \ 
    201                         $(DISABLE_NLS) \ 
    202                         $(PKG_CONFIGURE_OPTIONS) \ 
    203         ); 
    204 endef 
    205  
    206166define Build/Compile 
    207167        rm -rf $(PKG_INSTALL_DIR) 
     
    214174        ( cd $(PKG_BUILD_DIR); rm -f agent/snmpd; ) 
    215175        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    216                 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -static" \ 
     176                LDFLAGS="$(TARGET_LDFLAGS) -static" \ 
    217177                INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ 
    218178                all install 
     
    221181endef 
    222182 
     183define Build/InstallDev 
     184        mkdir -p $(1)/usr/bin 
     185        $(CP) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(1)/usr/bin/ 
     186        mkdir -p $(1)/usr/include 
     187        $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(1)/usr/include/ 
     188        mkdir -p $(1)/usr/lib 
     189        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(1)/usr/lib/ 
     190        $(SED) 's,-I/usr/include,,g' $(1)/usr/bin/net-snmp-config 
     191        $(SED) 's,-L/usr/lib,,g' $(1)/usr/bin/net-snmp-config 
     192endef 
     193 
     194define Build/UninstallDev 
     195        rm -rf  $(STAGING_DIR)/usr/bin/net-snmp-config \ 
     196                $(STAGING_DIR)/usr/include/net-snmp \ 
     197                $(STAGING_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} 
     198endef 
     199 
    223200define Package/libnetsnmp/install 
    224201        $(INSTALL_DIR) $(1)/usr/lib 
    225202        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(1)/usr/lib/ 
     203endef 
     204 
     205define Package/snmpd/conffiles 
     206/etc/default/snmpd 
     207/etc/snmp/snmpd.conf 
    226208endef 
    227209 
     
    237219endef 
    238220 
     221define Package/snmpd-static/conffiles 
     222/etc/default/snmpd 
     223/etc/snmp/snmpd.conf 
     224endef 
     225 
    239226define Package/snmpd-static/install 
    240227        $(INSTALL_DIR) $(1)/etc/snmp 
     
    253240endef 
    254241 
    255 define Build/InstallDev 
    256         mkdir -p $(1)/usr/bin 
    257         $(CP) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(1)/usr/bin/ 
    258         mkdir -p $(1)/usr/include 
    259         $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(1)/usr/include/ 
    260         mkdir -p $(1)/usr/lib 
    261         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(1)/usr/lib/ 
    262 endef 
    263  
    264 define Build/UninstallDev 
    265         rm -rf \ 
    266                 $(STAGING_DIR)/usr/bin/net-snmp-config \ 
    267                 $(STAGING_DIR)/usr/include/net-snmp \ 
    268                 $(STAGING_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} 
    269 endef 
    270  
    271242$(eval $(call BuildPackage,libnetsnmp)) 
    272243$(eval $(call BuildPackage,snmp-utils)) 
Note: See TracChangeset for help on using the changeset viewer.