]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/samba
suricata: Change midstream policy to "pass-flow"
[ipfire-2.x.git] / lfs / samba
CommitLineData
5f713bdc
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
90ea6fac 4# Copyright (C) 2007-2024 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
90ea6fac 27VER = 4.19.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
cb048899 36PAK_VER = 100
5f713bdc 37
cb048899 38DEPS = avahi cups perl-Parse-Yapp perl-JSON wsdd
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
90ea6fac 50$(DL_FILE)_BLAKE2 = 0f0081380ad459cca914e5e4cf505a4783ce97f0fb8c0471a6e558c747c16b0b327e545358265f365599c3807540985bcddb68aa67d14136cee4dbcb5158090c
5f713bdc
AF
51
52install : $(TARGET)
53
54check : $(patsubst %,$(DIR_CHK)/%,$(objects))
55
56download :$(patsubst %,$(DIR_DL)/%,$(objects))
57
9a7e4d85 58b2 : $(subst %,%_BLAKE2,$(objects))
5f713bdc 59
82d25bae 60dist:
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 \
23320dc5
AB
99 --with-syslog \
100 --without-smb1-server
1dd31d85
AF
101 cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
102 cd $(DIR_APP) && make install
103
82d25bae 104 -mkdir -p /var/ipfire/samba
00a5af61 105 cd $(DIR_APP)/source3 && install -v -m644 ../examples/smb.conf.default /var/ipfire/samba
5f713bdc
AF
106 cp -vrf $(DIR_SRC)/config/samba/* /var/ipfire/samba/
107 chown nobody:nobody -R /var/ipfire/samba/
5f713bdc 108 cat /var/ipfire/samba/global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf
1dd31d85
AF
109 rm -rf /var/lib/samba/private
110 ln -s /var/ipfire/samba/private /var/lib/samba/private
5f713bdc 111 install -v -m 644 $(DIR_SRC)/config/backup/includes/samba /var/ipfire/backup/addons/includes/samba
603248db 112
d70f58f6
AF
113 -mkdir -p /var/lib/samba/winbindd_privileged
114 chmod 750 /var/lib/samba/winbindd_privileged
603248db
MT
115 chgrp wbpriv /var/lib/samba/winbindd_privileged
116
be155433
MT
117 # Create spool directory for print jobs
118 mkdir -p /var/spool/samba
119 chmod -v 1777 /var/spool/samba/
120
37fe3658
MT
121 # Install password change helper script
122 install -m 755 $(DIR_SRC)/config/samba/samba-change-password /usr/sbin/samba-change-password
123
e215aaed 124 #install initscripts
f15707c7 125 $(call INSTALL_INITSCRIPTS,$(SERVICES))
e215aaed 126
5f713bdc
AF
127 @rm -rf $(DIR_APP)
128 @$(POSTBUILD)