Changeset 4239


Ignore:
Timestamp:
2006-07-23T19:11:35+02:00 (10 years ago)
Author:
nico
Message:

port avahi to buildroot-ng

Location:
packages/libs/avahi
Files:
2 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • packages/libs/avahi/Makefile

    r3892 r4239  
     1#  
     2# Copyright (C) 2006 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
    17# $Id$ 
    28 
     
    612PKG_VERSION:=0.6.10 
    713PKG_RELEASE:=1 
     14 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     17PKG_SOURCE_URL:=http://avahi.org/download/ 
    818PKG_MD5SUM:=cfb9e05c138dff4c430a35eee6229e8a 
    9  
    10 PKG_SOURCE_URL:=http://avahi.org/download/ 
    11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1219PKG_CAT:=zcat 
    1320 
    14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    1521PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    16  
    17 include $(TOPDIR)/package/rules.mk 
    18  
    19 $(eval $(call PKG_template,AVAHI_DAEMON,avahi-daemon,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    20 $(eval $(call PKG_template,AVAHI_DNSCONFD,avahi-dnsconfd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    21 $(eval $(call PKG_template,LIBAVAHI,libavahi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    22  
    23 $(PKG_BUILD_DIR)/.configured: 
    24         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ 
     22PKG_BUILDDEP:=expat libdaemon libgdbm 
     23 
     24include $(INCLUDE_DIR)/package.mk 
     25 
     26define Package/libavahi 
     27  SECTION:=libs 
     28  CATEGORY:=Libraries 
     29  DEPENDS:=+libdaemon 
     30  TITLE:=An mDNS/DNS-SD implementation (library) 
     31  DESCRIPTION:=An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library).\\\ 
     32    Avahi is a system which facilitates service discovery on a local network -- \\\ 
     33    this means that you can plug your laptop or computer into a network and \\\ 
     34    instantly be able to view other people who you can chat with, find printers \\\ 
     35    to print to or find files being shared. This kind of technology is already \\\ 
     36    found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') \\\ 
     37    and is very convenient.\\\ 
     38    \\\ 
     39    This package contains the mDNS/DNS-SD shared libraries, used by other programs. 
     40  URL:=http://www.avahi.org/ 
     41endef 
     42 
     43define Package/avahi-daemon 
     44  SECTION:=libs 
     45  CATEGORY:=Libraries 
     46  DEPENDS:=libavahi 
     47  TITLE:=An mDNS/DNS-SD implementation (daemon) 
     48  DESCRIPTION:=An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (daemon).\\\ 
     49    Avahi is a system which facilitates service discovery on a local network -- \\\ 
     50    this means that you can plug your laptop or computer into a network and \\\ 
     51    instantly be able to view other people who you can chat with, find printers \\\ 
     52    to print to or find files being shared. This kind of technology is already \\\ 
     53    found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') \\\ 
     54    and is very convenient.\\\ 
     55    \\\ 
     56    This package contains an mDNS/DNS-SD daemon. 
     57  URL:=http://www.avahi.org/ 
     58endef 
     59 
     60define Package/avahi-daemon/conffiles 
     61/etc/avahi/avahi-daemon.conf 
     62/etc/avahi/services/http.service 
     63/etc/avahi/services/ssh.service 
     64endef 
     65 
     66define Package/avahi-dnsconfd 
     67  SECTION:=libs 
     68  CATEGORY:=Libraries 
     69  DEPENDS:=libavahi 
     70  TITLE:=An Unicast DNS server from mDNS/DNS-SD configuration daemon 
     71  DESCRIPTION:=An Unicast DNS server from mDNS/DNS-SD configuration daemon.\\\ 
     72    Avahi is a system which facilitates service discovery on a local network -- \\\ 
     73    this means that you can plug your laptop or computer into a network and \\\ 
     74    instantly be able to view other people who you can chat with, find printers \\\ 
     75    to print to or find files being shared. This kind of technology is already \\\ 
     76    found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf') \\\ 
     77    and is very convenient.\\\ 
     78    \\\ 
     79    This package contains an Unicast DNS server from mDNS/DNS-SD configuration \\\ 
     80    daemon, which may be used to configure conventional DNS servers using mDNS \\\ 
     81    in a DHCP-like fashion. Especially useful on IPv6. 
     82  URL:=http://www.avahi.org/ 
     83endef 
     84 
     85define Build/Configure 
     86        (cd $(PKG_BUILD_DIR); rm -f config.cache; \ 
    2587                $(TARGET_CONFIGURE_OPTS) \ 
    2688                CFLAGS="$(TARGET_CFLAGS) -DNDEBUG" \ 
     
    82144                        --with-avahi-group=nogroup \ 
    83145        ); 
    84         touch $@ 
    85  
    86 $(PKG_BUILD_DIR)/.built: 
     146endef 
     147 
     148define Build/Compile 
    87149        rm -rf $(PKG_INSTALL_DIR) 
    88150        mkdir -p $(PKG_INSTALL_DIR) 
     
    90152                DESTDIR="$(PKG_INSTALL_DIR)" \ 
    91153                all install 
    92         touch $@ 
    93  
    94 $(IPKG_AVAHI_DAEMON): 
    95         install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/avahi 
    96         install -m0644 ./files/avahi-daemon.conf $(IDIR_AVAHI_DAEMON)/etc/avahi/ 
    97         install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/avahi/services 
    98         install -m0644 ./files/service-http $(IDIR_AVAHI_DAEMON)/etc/avahi/services/http.service 
    99         install -m0644 ./files/service-ssh $(IDIR_AVAHI_DAEMON)/etc/avahi/services/ssh.service 
    100         install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/init.d 
    101         install -m0755 ./files/avahi-daemon.init $(IDIR_AVAHI_DAEMON)/etc/init.d/avahi-daemon 
    102         install -d -m0755 $(IDIR_AVAHI_DAEMON)/usr/sbin 
    103         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(IDIR_AVAHI_DAEMON)/usr/sbin/ 
    104         $(RSTRIP) $(IDIR_AVAHI_DAEMON) 
    105         $(IPKG_BUILD) $(IDIR_AVAHI_DAEMON) $(PACKAGE_DIR) 
    106  
    107 $(IPKG_AVAHI_DNSCONFD): 
    108         install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/etc/avahi 
    109         $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(IDIR_AVAHI_DNSCONFD)/etc/avahi/ 
    110         install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/usr/sbin 
    111         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(IDIR_AVAHI_DNSCONFD)/usr/sbin/ 
    112         $(RSTRIP) $(IDIR_AVAHI_DNSCONFD) 
    113         $(IPKG_BUILD) $(IDIR_AVAHI_DNSCONFD) $(PACKAGE_DIR) 
    114  
    115 $(IPKG_LIBAVAHI): 
    116         install -d -m0755 $(IDIR_LIBAVAHI)/usr/lib 
    117         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so.* $(IDIR_LIBAVAHI)/usr/lib/ 
    118         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so.* $(IDIR_LIBAVAHI)/usr/lib/ 
    119         $(RSTRIP) $(IDIR_LIBAVAHI) 
    120         $(IPKG_BUILD) $(IDIR_LIBAVAHI) $(PACKAGE_DIR) 
    121  
    122 $(STAGING_DIR)/usr/lib/avahi.so: $(PKG_BUILD_DIR)/.built 
     154endef 
     155 
     156define Package/avahi-daemon/install 
     157        install -d -m0755 $(1)/etc/avahi 
     158        install -m0644 ./files/avahi-daemon.conf $(1)/etc/avahi/ 
     159        install -d -m0755 $(1)/etc/avahi/services 
     160        install -m0644 ./files/service-http $(1)/etc/avahi/services/http.service 
     161        install -m0644 ./files/service-ssh $(1)/etc/avahi/services/ssh.service 
     162        install -d -m0755 $(1)/etc/init.d 
     163        install -m0755 ./files/avahi-daemon.init $(1)/etc/init.d/avahi-daemon 
     164        install -d -m0755 $(1)/usr/sbin 
     165        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(1)/usr/sbin/ 
     166endef 
     167 
     168define Package/avahi-dnsconfd/install 
     169        install -d -m0755 $(1)/etc/avahi 
     170        $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(1)/etc/avahi/ 
     171        install -d -m0755 $(1)/usr/sbin 
     172        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(1)/usr/sbin/ 
     173endef 
     174 
     175define Package/libavahi/install 
     176        install -d -m0755 $(1)/usr/lib 
     177        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ 
     178endef 
     179 
     180define Build/InstallDev 
    123181        mkdir -p $(STAGING_DIR)/usr/include 
    124         $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-common $(STAGING_DIR)/usr/include/ 
    125         $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-core $(STAGING_DIR)/usr/include/ 
     182        $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-{common,core} $(STAGING_DIR)/usr/include/ 
    126183        mkdir -p $(STAGING_DIR)/usr/lib 
    127         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.a $(STAGING_DIR)/usr/lib/ 
    128         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so* $(STAGING_DIR)/usr/lib/ 
    129         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.a $(STAGING_DIR)/usr/lib/ 
    130         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so* $(STAGING_DIR)/usr/lib/ 
     184        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.{a,so*} $(STAGING_DIR)/usr/lib/ 
    131185        mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig 
    132186        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(STAGING_DIR)/usr/lib/pkgconfig/ 
    133         $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc 
    134         $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc 
    135         touch $@ 
    136  
    137 install-dev: $(STAGING_DIR)/usr/lib/avahi.so 
    138  
    139 uninstall-dev: 
     187        $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc 
     188        $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc 
     189endef 
     190 
     191define Build/UninstallDev 
    140192        rm -rf \ 
    141                 $(STAGING_DIR)/usr/include/avahi-common \ 
    142                 $(STAGING_DIR)/usr/include/avahi-core \ 
    143                 $(STAGING_DIR)/usr/lib/libavahi-common.a \ 
    144                 $(STAGING_DIR)/usr/lib/libavahi-common.so* \ 
    145                 $(STAGING_DIR)/usr/lib/libavahi-core.a \ 
    146                 $(STAGING_DIR)/usr/lib/libavahi-core.so* \ 
    147                 $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc \ 
    148  
    149 compile-targets: install-dev 
    150 clean-targets: uninstall-dev 
    151  
    152 mostlyclean: 
    153         -$(MAKE) -C $(PKG_BUILD_DIR) clean 
    154         rm -f $(PKG_BUILD_DIR)/.built 
    155  
     193                $(STAGING_DIR)/usr/include/avahi-{common,core} \ 
     194                $(STAGING_DIR)/usr/lib/libavahi-{common,core}.{a,so*} \ 
     195                $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc 
     196endef 
     197 
     198$(eval $(call BuildPackage,libavahi)) 
     199$(eval $(call BuildPackage,avahi-daemon)) 
     200$(eval $(call BuildPackage,avahi-dnsconfd)) 
Note: See TracChangeset for help on using the changeset viewer.