]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/samba
krb5: Move package into core system.
[people/pmueller/ipfire-2.x.git] / lfs / samba
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
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
25 include Config
26
27 VER = 4.16.0
28 SUMMARY = A SMB/CIFS File, Print, and Authentication Server
29
30 THISAPP = samba-$(VER)
31 DL_FILE = $(THISAPP).tar.gz
32 DL_FROM = $(URL_IPFIRE)
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
34 TARGET = $(DIR_INFO)/$(THISAPP)
35 PROG = samba
36 PAK_VER = 85
37
38 DEPS = avahi cups libtirpc perl-Parse-Yapp perl-JSON
39
40 SERVICES = samba
41
42 ###############################################################################
43 # Top-level Rules
44 ###############################################################################
45
46 objects = $(DL_FILE)
47
48 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
49
50 $(DL_FILE)_BLAKE2 = 6ea27634690d00779ec7f671e48b17246285c9576221d9b9b3f9238cd72310e8aaaeb646031212e65c239d2e959deef7bd9739932db0c716b7ea79cc11f2f7b8
51
52 install : $(TARGET)
53
54 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
55
56 download :$(patsubst %,$(DIR_DL)/%,$(objects))
57
58 b2 : $(subst %,%_BLAKE2,$(objects))
59
60 dist:
61 @$(PAK)
62
63 ###############################################################################
64 # Downloading, checking, b2sum
65 ###############################################################################
66
67 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
68 @$(CHECK)
69
70 $(patsubst %,$(DIR_DL)/%,$(objects)) :
71 @$(LOAD)
72
73 $(subst %,%_BLAKE2,$(objects)) :
74 @$(B2SUM)
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)
83 cd $(DIR_APP) && ./configure \
84 --prefix=/usr \
85 --libdir=/usr/lib/ \
86 --sysconfdir=/var/ipfire \
87 --localstatedir=/var \
88 --without-ad-dc \
89 --with-cachedir=/var/lib/samba \
90 --with-lockdir=/var/lib/samba \
91 --with-piddir=/var/run \
92 --with-ads \
93 --with-acl-support \
94 --with-sendfile-support \
95 --with-winbind \
96 --enable-avahi \
97 --enable-cups \
98 --enable-fhs \
99 --with-syslog
100 cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
101 cd $(DIR_APP) && make install
102
103 -mkdir -p /var/ipfire/samba
104 cd $(DIR_APP)/source3 && install -v -m644 ../examples/smb.conf.default /var/ipfire/samba
105 cp -vrf $(DIR_SRC)/config/samba/* /var/ipfire/samba/
106 chown nobody:nobody -R /var/ipfire/samba/
107 cat /var/ipfire/samba/global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf
108 rm -rf /var/lib/samba/private
109 ln -s /var/ipfire/samba/private /var/lib/samba/private
110 install -v -m 644 $(DIR_SRC)/config/backup/includes/samba /var/ipfire/backup/addons/includes/samba
111
112 -mkdir -p /var/lib/samba/winbindd_privileged
113 chmod 750 /var/lib/samba/winbindd_privileged
114 chgrp wbpriv /var/lib/samba/winbindd_privileged
115
116 # Create spool directory for print jobs
117 mkdir -p /var/spool/samba
118 chmod -v 1777 /var/spool/samba/
119
120 # Install password change helper script
121 install -m 755 $(DIR_SRC)/config/samba/samba-change-password /usr/sbin/samba-change-password
122
123 #install initscripts
124 $(call INSTALL_INITSCRIPTS,$(SERVICES))
125
126 @rm -rf $(DIR_APP)
127 @$(POSTBUILD)