netatalk: fix compiling with librpc (based on patch from #8858)
[openwrt/svn-archive/archive.git] / net / netatalk / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=netatalk
11 PKG_VERSION:=2.1.3
12 PKG_RELEASE:=1
13 PKG_SOURCE:=netatalk-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@SF/netatalk/
15 PKG_BUILD_PARALLEL:=1
16 PKG_MD5SUM:=785e287f5b5e5c9cce9397f9bce02a22
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/netatalk
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+libdb47 +libgcrypt +libopenssl +USE_UCLIBC:librpc
24 TITLE:=netatalk
25 URL:=http://netatalk.sourceforge.net
26 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
27 endef
28
29 define Package/netatalk/decription
30 Netatalk is a freely-available Open Source AFP fileserver.
31 It also provides a kernel level implementation of the AppleTalk
32 Protocol Suite.
33 endef
34
35 EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include
36 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
37 TARGET_LDFLAGS += $(LIBRPC)
38
39 CONFIGURE_VARS += \
40 CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -DNO_DEBUG "
41
42 CONFIGURE_ARGS += \
43 --disable-afs \
44 --enable-hfs \
45 --disable-debugging \
46 --disable-shell-check \
47 --disable-timelord \
48 --disable-a2boot \
49 --disable-cups \
50 --disable-tcp-wrappers \
51 --with-cnid-default-backend=dbd \
52 --with-bdb="$(STAGING_DIR)/usr/" \
53 --with-libgcrypt-dir="$(STAGING_DIR)/usr" \
54 --with-ssl-dir="$(STAGING_DIR)/usr" \
55 --with-uams-path="/usr/lib/uams" \
56 --disable-admin-group \
57 --disable-srvloc \
58
59 define Package/netatalk/install
60 $(INSTALL_DIR) $(1)/usr/sbin/
61 $(INSTALL_DIR) $(1)/usr/lib/uams/
62 $(INSTALL_DIR) $(1)/etc/netatalk/
63 $(INSTALL_DIR) $(1)/etc/init.d/
64 $(CP) $(PKG_BUILD_DIR)/etc/afpd/afpd $(1)/usr/sbin/
65 $(CP) $(PKG_BUILD_DIR)/bin/afppasswd/afppasswd $(1)/usr/sbin/
66 $(CP) $(PKG_BUILD_DIR)/etc/cnid_dbd/cnid_dbd $(1)/usr/sbin/
67 $(CP) $(PKG_BUILD_DIR)/etc/cnid_dbd/cnid_metad $(1)/usr/sbin/
68 $(CP) $(PKG_BUILD_DIR)/etc/uams/.libs/*.so $(1)/usr/lib/uams/
69 $(CP) ./files/AppleVolumes.* $(1)/etc/netatalk/
70 $(INSTALL_CONF) ./files/afpd.conf $(1)/etc/netatalk/
71 $(INSTALL_BIN) ./files/afpd.init $(1)/etc/init.d/afpd
72 endef
73
74 $(eval $(call BuildPackage,netatalk))