1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
28 SUMMARY = A SMB/CIFS File, Print, and Authentication Server
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)
38 DEPS = avahi cups perl-Parse-Yapp perl-JSON
42 ###############################################################################
44 ###############################################################################
48 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
50 $(DL_FILE)_BLAKE2 = f83af3b50d795bdc4a250fe96040721150acc3b8effddd473e3cfa3ef6eeec99928b1307a18a472be45049e1d0b74650b9f6dd4bf5c434277c94ab88cb493b3b
54 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56 download :$(patsubst %,$(DIR_DL)/%,$(objects))
58 b2 : $(subst %,%_BLAKE2,$(objects))
63 ###############################################################################
64 # Downloading, checking, b2sum
65 ###############################################################################
67 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
70 $(patsubst %,$(DIR_DL)/%,$(objects)) :
73 $(subst %,%_BLAKE2,$(objects)) :
76 ###############################################################################
77 # Installation Details
78 ###############################################################################
80 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
82 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
83 cd $(DIR_APP) && ./configure \
86 --sysconfdir=/var/ipfire \
87 --localstatedir=/var \
89 --with-cachedir=/var/lib/samba \
90 --with-lockdir=/var/lib/samba \
91 --with-piddir=/var/run \
94 --with-sendfile-support \
100 --without-smb1-server
101 cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
102 cd $(DIR_APP) && make install
104 -mkdir -p /var/ipfire/samba
105 cd $(DIR_APP)/source3 && install -v -m644 ../examples/smb.conf.default /var/ipfire/samba
106 cp -vrf $(DIR_SRC)/config/samba/* /var/ipfire/samba/
107 chown nobody:nobody -R /var/ipfire/samba/
108 cat /var/ipfire/samba/global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf
109 rm -rf /var/lib/samba/private
110 ln -s /var/ipfire/samba/private /var/lib/samba/private
111 install -v -m 644 $(DIR_SRC)/config/backup/includes/samba /var/ipfire/backup/addons/includes/samba
113 -mkdir -p /var/lib/samba/winbindd_privileged
114 chmod 750 /var/lib/samba/winbindd_privileged
115 chgrp wbpriv /var/lib/samba/winbindd_privileged
117 # Create spool directory for print jobs
118 mkdir -p /var/spool/samba
119 chmod -v 1777 /var/spool/samba/
121 # Install password change helper script
122 install -m 755 $(DIR_SRC)/config/samba/samba-change-password /usr/sbin/samba-change-password
125 $(call INSTALL_INITSCRIPTS,$(SERVICES))