You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
5.1 KiB
133 lines
5.1 KiB
## |
|
## samba.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH |
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package information |
|
Name: samba |
|
Summary: SMB/CIFS Server |
|
URL: http://www.samba.org/ |
|
Vendor: Andrew Tridgell |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG [EXP] |
|
Group: Filesystem |
|
License: GPL |
|
Version: 2.2.2 |
|
Release: 20011121.0 |
|
|
|
# list of sources |
|
Source0: ftp://ftp.samba.org/pub/samba/samba-%{version}.tar.gz |
|
Source1: smb.conf |
|
Source2: smb.hosts |
|
Source3: rc.samba |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 0.9-20011025.0, openssl |
|
PreReq: OpenPKG, openpkg >= 0.9-20011025.0 |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
Samba is an open source software suite that provides seamless file |
|
and print services to SMB/CIFS clients. |
|
|
|
%prep |
|
%setup -q |
|
|
|
%build |
|
( cd source |
|
CC="%{l_cc}" \ |
|
CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -I%{l_prefix}/include/openssl" \ |
|
LDFLAGS="-L%{l_prefix}/lib" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--localstatedir=%{l_prefix}/var/samba/run \ |
|
--sysconfdir=%{l_prefix}/etc/samba \ |
|
--with-privatedir=%{l_prefix}/var/samba/run \ |
|
--with-sambaconfdir=%{l_prefix}/etc/samba \ |
|
--with-lockdir=%{l_prefix}/var/samba/run \ |
|
--with-swatdir=%{l_prefix}/share/samba \ |
|
--with-codepagedir=%{l_prefix}/share/samba \ |
|
--with-ssl --with-sslinc=%{l_prefix}/include \ |
|
--with-pam \ |
|
--with-vfs |
|
%{l_make} %{l_mflags -O} \ |
|
CONFIGFILE=%{l_prefix}/etc/samba/smb.conf \ |
|
LMHOSTSFILE=%{l_prefix}/etc/samba/smb.hosts |
|
) |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/samba \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/samba \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/samba \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/samba \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/samba/run \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/samba/spool \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/samba/netlogon \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/samba/profiles |
|
( cd source |
|
%{l_make} %{l_mflags} install \ |
|
prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
BASEDIR=$RPM_BUILD_ROOT%{l_prefix} \ |
|
CONFIGDIR=$RPM_BUILD_ROOT%{l_prefix}/etc/samba \ |
|
VARDIR=$RPM_BUILD_ROOT%{l_prefix}/var/samba/run \ |
|
SWATDIR=$RPM_BUILD_ROOT%{l_prefix}/share/samba \ |
|
CODEPAGEDIR=$RPM_BUILD_ROOT%{l_prefix}/share/samba \ |
|
CONFIGFILE=%{l_prefix}/etc/samba/smb.conf \ |
|
LMHOSTSFILE=%{l_prefix}/etc/samba/smb.hosts |
|
) |
|
l_hostname=`%{l_shtool} echo -e %h%d` |
|
%{l_shtool} install -c -m 644 \ |
|
-e "s;@l_prefix@;%{l_prefix};g" \ |
|
-e "s;@l_hostname@;$l_hostname;g" \ |
|
%{SOURCE smb.conf} \ |
|
%{SOURCE smb.hosts} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/samba/ |
|
for file in make_printerdef make_smbcodepage make_unicodemap \ |
|
testparm testprns; do |
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/$file \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/samba/$file |
|
done |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/samba/using_samba |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/samba/help |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/samba/images |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/samba/include |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
|
%{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \ |
|
%{SOURCE rc.samba} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
%{l_files_std} \ |
|
'%config %{l_prefix}/etc/samba/*' \ |
|
'%attr(1777,%{l_fsusr},%{l_fsgrp}) %{l_prefix}/var/samba/spool' \ |
|
'%attr(1777,%{l_fsusr},%{l_fsgrp}) %{l_prefix}/var/samba/profiles' |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|