summaryrefslogtreecommitdiffstats
path: root/packaging/RHEL
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-04-22 17:28:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:27 -0500
commit7c83df11599f856a6c71f8133511d1d2604b24ef (patch)
tree1ae292c15370f50435a9e35863dd7ab321f80a48 /packaging/RHEL
parent7b75d2c650cc8dfe8c9d5b9e396afce1cedb0645 (diff)
downloadsamba-7c83df11599f856a6c71f8133511d1d2604b24ef.tar.gz
samba-7c83df11599f856a6c71f8133511d1d2604b24ef.tar.xz
samba-7c83df11599f856a6c71f8133511d1d2604b24ef.zip
r15163: packaging updates for RHEL/Fedora and break out 'pre' tag to the RPM release number
(This used to be commit e3763272c39dc85e7feca4fc5646225b4b266fbc)
Diffstat (limited to 'packaging/RHEL')
-rw-r--r--packaging/RHEL/makerpms.sh.tmpl24
-rw-r--r--packaging/RHEL/samba.spec.tmpl42
2 files changed, 41 insertions, 25 deletions
diff --git a/packaging/RHEL/makerpms.sh.tmpl b/packaging/RHEL/makerpms.sh.tmpl
index ebaa4e649f7..5b377bda575 100644
--- a/packaging/RHEL/makerpms.sh.tmpl
+++ b/packaging/RHEL/makerpms.sh.tmpl
@@ -21,6 +21,7 @@ SRCDIR=`rpm --eval %_sourcedir`
USERID=`id -u`
GRPID=`id -g`
VERSION='PVERSION'
+REVISION='PREVISION'
SPECFILE="samba.spec"
RPMVER=`rpm --version | awk '{print $3}'`
RPM="rpmbuild"
@@ -38,12 +39,29 @@ case $RPMVER in
;;
esac
-( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
-( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
+pushd .
+cd ../../source
+if [ -f Makefile ]; then
+ make distclean
+fi
+popd
+pushd .
+cd ../../../
+chown -R ${USERID}.${GRPID} samba-${VERSION}${REVISION}
+if [ ! -d samba-${VERSION} ]; then
+ ln -s samba-${VERSION}${REVISION} samba-${VERSION} || exit 1
+fi
echo -n "Creating samba-${VERSION}.tar.bz2 ... "
-( cd ../../.. ; tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2 )
+tar --exclude=.svn -cf - samba-${VERSION}/. | bzip2 > ${SRCDIR}/samba-${VERSION}.tar.bz2
echo "Done."
+if [ $? -ne 0 ]; then
+ echo "Build failed!"
+ exit 1
+fi
+
+popd
+
##
## copy additional source files
diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl
index 6e5ebcb6d0b..70501db7ae7 100644
--- a/packaging/RHEL/samba.spec.tmpl
+++ b/packaging/RHEL/samba.spec.tmpl
@@ -6,7 +6,7 @@ Vendor: Samba Team
Packager: Samba Team <samba@samba.org>
Name: samba
Version: PVERSION
-Release: PRELEASE
+Release: PRELEASEPRPMREV
License: GNU GPL version 2
Group: System Environment/Daemons
URL: http://www.samba.org/
@@ -27,7 +27,7 @@ Provides: samba = %{version}
Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: pam-devel, readline-devel, ncurses-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel
+BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap2-devel, krb5-devel, cups-devel
# Working around perl dependency problem from docs
%define __perl_requires %{SOURCE998}
@@ -109,15 +109,15 @@ utilized by SWAT as well as the HTML and PDF version of "Using Samba",
/bin/cp setup/filter-requires-samba.sh %{SOURCE998}
cd source
-%ifarch i386 sparc
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
-%endif
-%ifarch ia64
-libtoolize --copy --force # get it to recognize IA-64
-autoheader
-autoconf
-EXTRA="-D_LARGEFILE64_SOURCE"
-%endif
+# RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
+
+## check for ccache
+ccache -h 2>&1 > /dev/null
+#if [ $? -eq 0 ]; then
+# CC="ccache gcc"
+#else
+ CC="gcc"
+#fi
## always run autogen.sh
./autogen.sh
@@ -184,7 +184,6 @@ rm -rf $RPM_BUILD_ROOT
# Create the target build directory hierarchy
mkdir -p $RPM_BUILD_ROOT%{_datadir}/swat/{help,include,using_samba/{figs,gifsa}}
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/swat/using_samba
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
@@ -224,10 +223,6 @@ install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient
install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{_libdir}/libsmbclient.a
install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{_includedir}
ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT%{_libdir}/libsmbclient.so.0
-#if [ %{_libdir} == /usr/lib64 ];then
-# ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT/usr/lib/libsmbclient.so.0
-# ln -s %{_libdir}/libsmbclient.so $RPM_BUILD_ROOT/usr/lib/libsmbclient.so
-#fi
# make install puts libmsrpc.so in the wrong place on x86_64
rm -f $RPM_BUILD_ROOT/usr/lib*/samba/libmsrpc.so $RPM_BUILD_ROOT/usr/lib*/samba/libmsrpc.a || true
@@ -236,17 +231,17 @@ install -m 755 source/bin/libmsrpc.a $RPM_BUILD_ROOT%{_libdir}/libmsrpc.a
install -m 644 source/include/libmsrpc.h $RPM_BUILD_ROOT%{_includedir}
rm -f $RPM_BUILD_ROOT%{_libdir}/samba/libmsrpc.*
ln -s /%{_libdir}/libmsrpc.so $RPM_BUILD_ROOT%{_libdir}/libmsrpc.so.0
-#if [ %{_libdir} == /usr/lib64 ];then
-# ln -s %{_libdir}/libmsrpc.so $RPM_BUILD_ROOT/usr/lib/libmsrpc.so.0
-# ln -s %{_libdir}/libmsrpc.so $RPM_BUILD_ROOT/usr/lib/libmsrpc.so
-#fi
# Install pam_smbpass.so
install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so
+## cleanup
+/bin/rm -rf $RPM_BUILD_ROOT/usr/lib*/samba/security
+
# we need a symlink for mount to recognise the smb and smbfs filesystem types
-ln -sf %{_prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
-ln -sf %{_prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+ln -sf %{_prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+ln -sf %{_prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+/bin/rm -f $RPM_BUILD_ROOT/mount.smbfs
# Install the miscellany
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT%{_sysconfdir}/samba/lmhosts
@@ -264,6 +259,8 @@ install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin/mount.cifs
install -m755 source/client/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
install -m755 source/script/mksmbpasswd.sh $RPM_BUILD_ROOT%{_bindir}
+/bin/rm $RPM_BUILD_ROOT%{_sbindir}/*mount.cifs
+
ln -s ../..%{initdir}/smb $RPM_BUILD_ROOT%{_sbindir}/samba
ln -s ../..%{initdir}/winbind $RPM_BUILD_ROOT%{_sbindir}/winbind
@@ -399,6 +396,7 @@ fi
%doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
%doc examples/printing
%doc %{_datadir}/swat/help
+%doc %{_datadir}/swat/using_samba
##########