]>
Commit | Line | Data |
---|---|---|
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 | ||
25 | include Config | |
26 | ||
e8e8b6ae | 27 | VER = 4.16.0 |
f15707c7 | 28 | SUMMARY = A SMB/CIFS File, Print, and Authentication Server |
5f713bdc AF |
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 | |
377ffa08 | 36 | PAK_VER = 85 |
5f713bdc | 37 | |
4fdd3558 | 38 | DEPS = avahi cups libtirpc perl-Parse-Yapp perl-JSON |
5f713bdc | 39 | |
f15707c7 RR |
40 | SERVICES = samba |
41 | ||
5f713bdc AF |
42 | ############################################################################### |
43 | # Top-level Rules | |
44 | ############################################################################### | |
45 | ||
46 | objects = $(DL_FILE) | |
47 | ||
48 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
49 | ||
e8e8b6ae | 50 | $(DL_FILE)_BLAKE2 = 6ea27634690d00779ec7f671e48b17246285c9576221d9b9b3f9238cd72310e8aaaeb646031212e65c239d2e959deef7bd9739932db0c716b7ea79cc11f2f7b8 |
5f713bdc AF |
51 | |
52 | install : $(TARGET) | |
53 | ||
54 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
55 | ||
56 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
57 | ||
9a7e4d85 | 58 | b2 : $(subst %,%_BLAKE2,$(objects)) |
5f713bdc | 59 | |
82d25bae | 60 | dist: |
5f713bdc AF |
61 | @$(PAK) |
62 | ||
63 | ############################################################################### | |
9a7e4d85 | 64 | # Downloading, checking, b2sum |
5f713bdc AF |
65 | ############################################################################### |
66 | ||
67 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
68 | @$(CHECK) | |
69 | ||
70 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
71 | @$(LOAD) | |
72 | ||
9a7e4d85 PM |
73 | $(subst %,%_BLAKE2,$(objects)) : |
74 | @$(B2SUM) | |
5f713bdc AF |
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) |