1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

working on packaging; also fixed some path issues in configure.in & Makefile.in

This commit is contained in:
Gerald Carter 0001-01-01 00:00:00 +00:00
parent 3684cffbd2
commit 8f6cd36fa0
4 changed files with 48 additions and 22 deletions

View File

@ -48,12 +48,14 @@ for file in samba.pamd samba.sysconfig samba.spec \
smb.init swat.desktop filter-requires-samba.sh \
samba.log samba.xinetd smbprint winbind.init
do
cp -p filter-requires-samba.sh ${SRCDIR}
cp -p $file ${SRCDIR}
done
chmod 755 ${SRCDIR}/filter-requires-samba.sh
cp -p ${SPECFILE} ${SPECDIR}
##
## Build
##

View File

@ -107,11 +107,9 @@ fi
CFLAGS="$RPM_OPT_FLAGS" ./configure \
--prefix=%{_prefix} \
--localstatedir=/var \
--with-configdir=%{_sysconfdir}/samba \
--sysconfdir=/etc \
--with-privatedir=%{_sysconfdir}/samba \
--with-piddir=/var/run \
--with-fhs \
--with-lockdir=/var/lib/samba \
--with-quotas \
--with-smbmount \
--with-pam \
@ -122,6 +120,7 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure \
--with-swatdir=%{_datadir}/swat \
--with-libsmbclient \
--with-acl-support
make showlayout
make proto
make %{?_smp_mflags} all nsswitch/libnss_wins.so debug2html
@ -155,7 +154,8 @@ ln -s ../..%{initdir}/smb $RPM_BUILD_ROOT%{_sbindir}/samba
install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/pam.d/samba
install -m644 $RPM_SOURCE_DIR/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
## mount.smbfs is installed by Samba's Makefile
## ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
# pam_smbpass
@ -166,10 +166,10 @@ mv source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so
mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
install -m 755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so
mkdir -p $RPM_BUILD_ROOT%{_libdir}
install -m 755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_lib}/libnss_winbind.so.2
ln -sf /%{_lib}/libnss_winbind.so.2 $RPM_BUILD_ROOT%{_libdir}/libnss_winbind.so
install -m 755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_lib}/libnss_wins.so.2
ln -sf /%{_lib}/libnss_wins.so.2 $RPM_BUILD_ROOT%{_libdir}/libnss_wins.so
install -m 755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/%{_lib}/libnss_winbind.so
ln -sf /%{_lib}/libnss_winbind.so $RPM_BUILD_ROOT%{_libdir}/libnss_winbind.so.2
install -m 755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/%{_lib}/libnss_wins.so
ln -sf /%{_lib}/libnss_wins.so $RPM_BUILD_ROOT%{_libdir}/libnss_wins.so.2
# libsmbclient
@ -186,6 +186,9 @@ install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/swat
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba
##
## Clean out man pages for tools not installed here
##
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/editreg.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbsh.1*
@ -325,10 +328,8 @@ fi
%files common
%defattr(-,root,root)
%{_libdir}/libnss_wins.so
/%{_lib}/libnss_wins.so.2
%{_libdir}/libnss_winbind.so
/%{_lib}/libnss_winbind.so.2
/%{_lib}/libnss_wins.so.*
/%{_lib}/libnss_winbind.so.*
/%{_lib}/security/pam_winbind.so
%{_libdir}/libsmbclient.a
%{_libdir}/libsmbclient.so

View File

@ -9,7 +9,6 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
mandir=@mandir@
LIBS=@LIBS@
CC=@CC@
@ -1293,12 +1292,16 @@ installman: installdirs
showlayout:
@echo "Samba will be installed into:"
@echo " basedir: $(BASEDIR)"
@echo " bindir: $(BINDIR)"
@echo " sbindir: $(SBINDIR)"
@echo " libdir: $(LIBDIR)"
@echo " vardir: $(VARDIR)"
@echo " mandir: $(MANDIR)"
@echo " basedir: $(BASEDIR)"
@echo " bindir: $(BINDIR)"
@echo " sbindir: $(SBINDIR)"
@echo " libdir: $(LIBDIR)"
@echo " vardir: $(VARDIR)"
@echo " mandir: $(MANDIR)"
@echo " privatedir: $(PRIVATE_DIR)"
@echo " configdir: $(CONFIGDIR)"
@echo " lockdir: $(LOCKDIR)"
@echo " piddir: $(PIDDIR)"
uninstall: uninstallman uninstallbin uninstallscripts uninstallmodules

View File

@ -17,8 +17,9 @@ AC_PREFIX_DEFAULT(/usr/local/samba)
AC_ARG_WITH(fhs,
[ --with-fhs Use FHS-compliant paths (default=no)],
configdir="${sysconfdir}/samba"
lockdir="\${VARDIR}/cache/samba"
piddir="\${VARDIR}/run/samba"
lockdir="\${VARDIR}/lib/samba"
piddir="\${VARDIR}/run"
mandir="\${prefix}/share/man"
logfilebase="\${VARDIR}/log/samba"
privatedir="\${CONFIGDIR}/private"
libdir="\${prefix}/lib/samba"
@ -27,6 +28,7 @@ AC_ARG_WITH(fhs,
logfilebase="\${VARDIR}"
lockdir="\${VARDIR}/locks"
piddir="\${VARDIR}/locks"
mandir="\${prefix}/man"
privatedir="\${prefix}/private"
swatdir="\${prefix}/swat")
@ -78,6 +80,23 @@ AC_ARG_WITH(piddir,
;;
esac])
#################################################
# set pid directory location
AC_ARG_WITH(piddir,
[ --with-mandir=DIR Where to put man pages ($ac_default_prefix/man)],
[ case "$withval" in
yes|no)
#
# Just in case anybody calls it without argument
#
AC_MSG_WARN([--with-mandir called without argument - will use default])
;;
* )
piddir="$withval"
;;
esac])
#################################################
# set SWAT directory location
AC_ARG_WITH(swatdir,
@ -148,6 +167,7 @@ done
AC_SUBST(configdir)
AC_SUBST(lockdir)
AC_SUBST(piddir)
AC_SUBST(mandir)
AC_SUBST(logfilebase)
AC_SUBST(privatedir)
AC_SUBST(swatdir)