]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/samba
buildprocess: Add extra metadata to pak lfs files
[people/pmueller/ipfire-2.x.git] / lfs / samba
CommitLineData
5f713bdc
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
1dd31d85 4# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
5f713bdc
AF
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
61d7aaa3 27VER = 4.15.5
f15707c7 28SUMMARY = A SMB/CIFS File, Print, and Authentication Server
5f713bdc
AF
29
30THISAPP = samba-$(VER)
31DL_FILE = $(THISAPP).tar.gz
32DL_FROM = $(URL_IPFIRE)
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34TARGET = $(DIR_INFO)/$(THISAPP)
35PROG = samba
61d7aaa3 36PAK_VER = 83
5f713bdc 37
391540d9 38DEPS = avahi cups libtirpc krb5 perl-Parse-Yapp
5f713bdc 39
f15707c7
RR
40SERVICES = samba
41
5f713bdc
AF
42###############################################################################
43# Top-level Rules
44###############################################################################
45
46objects = $(DL_FILE)
47
48$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
49
61d7aaa3 50$(DL_FILE)_MD5 = c5c8221de44dc04ad7f3358d3b118d61
5f713bdc
AF
51
52install : $(TARGET)
53
54check : $(patsubst %,$(DIR_CHK)/%,$(objects))
55
56download :$(patsubst %,$(DIR_DL)/%,$(objects))
57
58md5 : $(subst %,%_MD5,$(objects))
59
82d25bae 60dist:
5f713bdc
AF
61 @$(PAK)
62
63###############################################################################
64# Downloading, checking, md5sum
65###############################################################################
66
67$(patsubst %,$(DIR_CHK)/%,$(objects)) :
68 @$(CHECK)
69
70$(patsubst %,$(DIR_DL)/%,$(objects)) :
71 @$(LOAD)
72
73$(subst %,%_MD5,$(objects)) :
74 @$(MD5)
75
76###############################################################################
77# Installation Details
78###############################################################################
79
80$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
81 @$(PREBUILD)
82 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
1dd31d85 83 cd $(DIR_APP) && ./configure \
879dafbf
MT
84 --prefix=/usr \
85 --libdir=/usr/lib/ \
86 --sysconfdir=/var/ipfire \
87 --localstatedir=/var \
1dd31d85 88 --without-ad-dc \
88921935 89 --with-cachedir=/var/lib/samba \
603248db 90 --with-lockdir=/var/lib/samba \
879dafbf
MT
91 --with-piddir=/var/run \
92 --with-ads \
93 --with-acl-support \
879dafbf 94 --with-sendfile-support \
879dafbf 95 --with-winbind \
391540d9 96 --enable-avahi \
879dafbf 97 --enable-cups \
391540d9 98 --enable-fhs \
879dafbf 99 --with-syslog
1dd31d85
AF
100 cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
101 cd $(DIR_APP) && make install
102
82d25bae 103 -mkdir -p /var/ipfire/samba
00a5af61 104 cd $(DIR_APP)/source3 && install -v -m644 ../examples/smb.conf.default /var/ipfire/samba
5f713bdc
AF
105 cp -vrf $(DIR_SRC)/config/samba/* /var/ipfire/samba/
106 chown nobody:nobody -R /var/ipfire/samba/
5f713bdc 107 cat /var/ipfire/samba/global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf
1dd31d85
AF
108 rm -rf /var/lib/samba/private
109 ln -s /var/ipfire/samba/private /var/lib/samba/private
5f713bdc 110 install -v -m 644 $(DIR_SRC)/config/backup/includes/samba /var/ipfire/backup/addons/includes/samba
603248db 111
d70f58f6
AF
112 -mkdir -p /var/lib/samba/winbindd_privileged
113 chmod 750 /var/lib/samba/winbindd_privileged
603248db
MT
114 chgrp wbpriv /var/lib/samba/winbindd_privileged
115
be155433
MT
116 # Create spool directory for print jobs
117 mkdir -p /var/spool/samba
118 chmod -v 1777 /var/spool/samba/
119
37fe3658
MT
120 # Install password change helper script
121 install -m 755 $(DIR_SRC)/config/samba/samba-change-password /usr/sbin/samba-change-password
122
e215aaed 123 #install initscripts
f15707c7 124 $(call INSTALL_INITSCRIPTS,$(SERVICES))
e215aaed 125
5f713bdc
AF
126 @rm -rf $(DIR_APP)
127 @$(POSTBUILD)