source: packages/net/samba3/Makefile @ 28302

Last change on this file since 28302 was 28302, checked in by jow, 5 years ago

[packages] samba3: don't source /etc/functions.sh in the initscript, rc.local takes care of that in cross-compile firendly way

File size: 2.1 KB
Line 
1#
2# Copyright (C) 2008-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=samba3
10PKG_VERSION:=3.0.24
11PKG_RELEASE:=8
12PKG_MD5SUM:=89273f67a6d8067cbbecefaa13747153
13
14PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/samba/old-versions/
15PKG_SOURCE:=samba-$(PKG_VERSION).tar.gz
16PKG_BUILD_DIR:=$(BUILD_DIR)/samba-$(PKG_VERSION)/
17
18include $(INCLUDE_DIR)/package.mk
19
20TARGET_CFLAGS+=$(if $(CONFIG_SAMBA3_DEBUG),-DSAMBA_DEBUG)
21
22define Package/samba3
23  SECTION:=net
24  CATEGORY:=Network
25  SUBMENU:=Filesystem
26  TITLE:=samba3
27  DEPENDS:=+libpthread
28  URL:=http://www.samba.org/
29endef
30
31define Package/samba3/Description
32  Samba3 - made small with patches taken from AVM GPL releases and freetz
33endef
34
35define Package/samba3/conffiles
36/etc/config/samba
37/etc/samba/smb.conf.template
38endef
39
40define Package/samba3/config
41        source "$(SOURCE)/Config.in"
42endef
43
44define Build/Prepare/LFS
45endef
46
47define Build/Prepare
48$(call Build/Prepare/Default)
49endef
50
51define Build/Configure
52        [ -f "$(PKG_BUILD_DIR)/source/include/config.h.save" ] || \
53                $(CP) $(PKG_BUILD_DIR)/source/include/config.h \
54                        $(PKG_BUILD_DIR)/source/include/config.h.save
55        cat \
56                $(PKG_BUILD_DIR)/source/include/config.h.save \
57                ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
58        $(Build/Configure/Default)
59endef
60
61define Build/Compile
62        CC="$(TARGET_CC)" \
63        CFLAGS="$(TARGET_CFLAGS)" \
64        CPPFLAGS="$(TARGET_CPPFLAGS)" \
65        LDFLAGS="$(TARGET_LDFLAGS)" \
66        $(MAKE) -C $(PKG_BUILD_DIR)/source \
67                $(TARGET_CONFIGURE_OPTS) \
68                all bin/smbpasswd
69endef
70
71define Package/samba3/install
72        $(INSTALL_DIR) $(1)/etc/{samba,init.d,config}
73        $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
74        $(INSTALL_DATA) ./files/samba.config $(1)/etc/config/samba
75        $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba/
76        touch $(1)/etc/samba/smbpasswd
77        $(INSTALL_DIR) $(1)/bin
78        $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/bin/
79        $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/bin/
80        $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/bin/
81endef
82
83$(eval $(call BuildPackage,samba3))
Note: See TracBrowser for help on using the repository browser.