Ticket #12100: Makefile

File Makefile, 2.3 KB (added by arlan.jia@…, 5 years ago)

Makefile

Line 
1#
2# Copyright (C) 2009-2012 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=netatalk
11PKG_VERSION:=3.0.1
12PKG_RELEASE:=5
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@SF/netatalk
16PKG_MD5SUM:=b4f5c932b2ca99f5292bd6b6d69b3ebc
17
18PKG_BUILD_PARALLEL:=1
19PKG_INSTALL:=1
20PKG_FIXUP:=autoreconf
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/netatalk
25  SECTION:=net
26  CATEGORY:=Network
27  SUBMENU:=Filesystem
28  DEPENDS:=+libdb47 +libgcrypt +libopenssl +mdnsresponder +libavahi-client $(LIBRPC_DEPENDS)
29  TITLE:=netatalk
30  URL:=http://netatalk.sourceforge.net
31  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
32endef
33
34define Package/netatalk/decription
35  Netatalk is a freely-available Open Source AFP fileserver.
36  It also provides a kernel level implementation of the AppleTalk
37  Protocol Suite.
38endef
39
40define Package/netatalk/conffiles
41/etc/afp.conf
42endef
43
44TARGET_CFLAGS += -std=gnu99 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
45TARGET_LDFLAGS += $(LIBRPC)
46
47CONFIGURE_ARGS += \
48        --disable-afs \
49        --enable-hfs \
50        --disable-debugging \
51        --disable-shell-check \
52        --disable-timelord \
53        --disable-a2boot \
54        --enable-zeroconf \
55        --disable-cups \
56        --disable-tcp-wrappers \
57        --with-cnid-default-backend=dbd \
58        --with-bdb="$(STAGING_DIR)/usr/" \
59        --with-libgcrypt-dir="$(STAGING_DIR)/usr" \
60        --with-ssl-dir="$(STAGING_DIR)/usr" \
61        --with-uams-path="/usr/lib/uams" \
62        --disable-admin-group \
63        --disable-srvloc \
64        --with-shadow \
65        --without-ldap
66
67define Package/netatalk/install
68        $(INSTALL_DIR) $(1)/usr/bin
69                $(CP) $(PKG_INSTALL_DIR)/usr/bin/ad $(1)/usr/bin/
70                $(CP) $(PKG_INSTALL_DIR)/usr/bin/afppasswd $(1)/usr/bin/
71                $(CP) $(PKG_INSTALL_DIR)/usr/bin/apple_dump $(1)/usr/bin/
72                $(CP) $(PKG_INSTALL_DIR)/usr/bin/cnid2_create $(1)/usr/bin/
73                $(CP) $(PKG_INSTALL_DIR)/usr/bin/dbd $(1)/usr/bin/
74
75        $(INSTALL_DIR) $(1)/usr/lib
76                $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
77
78        $(INSTALL_DIR) $(1)/usr/lib/uams
79                $(CP) $(PKG_INSTALL_DIR)/usr/lib/uams/*.so $(1)/usr/lib/uams/
80
81        $(INSTALL_DIR) $(1)/usr/sbin
82                $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
83       
84        $(INSTALL_DIR) $(1)/etc/
85                $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/afp.conf $(1)/etc/
86
87        $(INSTALL_DIR) $(1)/etc/init.d
88                $(INSTALL_BIN) ./files/afpd.init $(1)/etc/init.d/netatalk
89
90endef
91
92$(eval $(call BuildPackage,netatalk))