8d66d0d0474b128564887989835144e66dc929cf
[openwrt/svn-archive/archive.git] / net / samba3 / Makefile
1 #
2 # Copyright (C) 2008-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 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=samba3
10 PKG_VERSION:=3.0.24
11 PKG_RELEASE:=7
12 PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153
13
14 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
15 PKG_SOURCE:=samba-$(PKG_VERSION).tar.gz
16 PKG_BUILD_DIR:=$(BUILD_DIR)/samba-$(PKG_VERSION)/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_DEBUG),-DSAMBA_DEBUG)
21
22 define Package/samba3
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=samba3
26 DEPENDS:=+libpthread
27 URL:=http://www.samba.org/
28 endef
29
30 define Package/samba3/Description
31 Samba3 - made small with patches taken from AVM GPL releases and freetz
32 endef
33
34 define Package/samba3/config
35 source "$(SOURCE)/Config.in"
36 endef
37
38 ifneq ($(CONFIG_LARGEFILE),)
39 define Build/Prepare/LFS
40 cat ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
41 endef
42 endif
43
44 define Build/Prepare
45 $(call Build/Prepare/Default)
46 $(call Build/Prepare/LFS)
47 endef
48
49 define Build/Compile
50 CC="$(TARGET_CC)" \
51 CFLAGS="$(TARGET_CFLAGS)" \
52 CPPFLAGS="$(TARGET_CPPFLAGS)" \
53 LDFLAGS="$(TARGET_LDFLAGS)" \
54 $(MAKE) -C $(PKG_BUILD_DIR)/source \
55 all bin/smbpasswd
56 endef
57
58 define Package/samba3/install
59 $(INSTALL_DIR) $(1)/etc/{samba,init.d,config}
60 $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
61 $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
62 $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/
63 touch $(1)/etc/samba/smbpasswd
64 $(INSTALL_DIR) $(1)/bin
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/bin/
67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/
68 endef
69
70 $(eval $(call BuildPackage,samba3))