File novell-filesystem.spec of Package novell-filesystem
#
# spec file for package novell-filesystem (Version 0.0.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: novell-filesystem
Url: http://www.novell.com
License: Any commercial; Other License(s), see package
Group: System/Fhs
AutoReqProv: on
Requires: coreutils
Summary: Novell Standard Directory Layout
Version: 0.0.1
Release: 19
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: directory.list
# Source1: filesystem.links
# Source2: languages
Source64: directory.list64
%description
This package installs the basic Novell directory structure. Primarily
for Novell Open Enterprise Server.
Authors:
--------
Craig Gardner
%prep
# %setup -c -n filesystem -T
%build
:
%install
function create_dir () {
local MODE=$1
local OWNR=$2
local GRUP=$3
local NAME=$4
local XTRA=$5
local BDIR=`dirname $NAME`
test -d "$RPM_BUILD_ROOT/$NAME" && { echo "dir $NAME already exists" ; echo "input out of sequence ?" ; exit 1 ; }
test -n "$BDIR" -a ! -d $RPM_BUILD_ROOT$BDIR && create_dir 0755 root root $BDIR
test -d "$RPM_BUILD_ROOT/$NAME" && { echo "dir $NAME already exists" ; echo "input out of sequence ?" ; exit 1 ; }
test -n "$BDIR" -a ! -d $RPM_BUILD_ROOT$BDIR && create_dir 0755 root root $BDIR
mkdir -m $MODE $RPM_BUILD_ROOT/$NAME
# echo "$XTRA%%dir %%attr($MODE,$OWNR,$GRUP) $NAME" >> filesystem.list
}
echo "%%defattr(-,root,root)" > filesystem.list
{
cat %{SOURCE0}
%ifarch s390x sparc64 x86_64 ppc64 ppc
cat %{SOURCE64}
%endif
} |
while read MOD OWN GRP NAME ; do
%ifarch s390 s390x
case $NAME in
/media/floppy|/media/cdrom|/floppy|/cdrom) continue ;;
esac
%endif
case $NAME in
/media/floppy|/media/cdrom)
create_dir $MOD $OWN $GRP $NAME "%%ghost "
continue ;;
esac
create_dir $MOD $OWN $GRP $NAME && echo "%%dir %%attr($MOD,$OWN,$GRP) $NAME" >> filesystem.list
done
# now do the links
while read SRC DEST ; do
case $SRC in
"") continue ;;
\#*) echo "comment: $SRC $DEST" ;;
*)
case $SRC in
/*) test -d $RPM_BUILD_ROOT/$SRC || { echo "link src doesn't exist" ; exit 1 ; }
;;
*) test -d $RPM_BUILD_ROOT/`dirname $DEST`/$SRC || { echo "link src doesn't exist" ; exit 1 ; }
;;
esac
ln -sf $SRC $RPM_BUILD_ROOT$DEST
echo "%%dir $DEST" >> filesystem.list
;;
esac
done < /dev/null
# done < %{SOURCE1}
RPM_INSTALL_PREFIX=$RPM_BUILD_ROOT
export RPM_BUILD_ROOT
%files -f filesystem.list
# %files
# %defattr(-,root,root)
# %dir %attr(0755,root,root) /opt/novell
# %dir %attr(0755,root,root) /opt/novell/bin
# %dir %attr(0755,root,root) /opt/novell/sbin
# %dir %attr(0755,root,root) /opt/novell/lib
# %dir %attr(0755,root,root) /opt/novell/include
# %dir %attr(0755,root,root) /opt/novell/share
# %dir %attr(0755,root,root) /var/opt/novell
# %dir %attr(0755,root,root) /var/opt/novell/log
# %dir %attr(0755,root,root) /var/opt/novell/run
# %dir %attr(0755,root,root) /usr/novell
# %dir %attr(0755,root,root) /etc/opt/novell
# %dir %attr(0755,root,root) /opt/novell/man
# %dir %attr(0755,root,root) /opt/novell/man/man1
# %dir %attr(0755,root,root) /opt/novell/man/man5
# %dir %attr(0755,root,root) /opt/novell/man/man7
# %dir %attr(0755,root,root) /opt/novell/man/man8
%changelog
* Tue May 06 2008 cgardner@novell.com
- Removed /var/novell for CODE11
- Added several language dirs to /opt/novell/man:
cs de es frutf8 hu it ja po pt ru sk zh-cn zh-tw
* Fri Aug 17 2007 cgardner@novell.com
- Bug #301211 - Manage /etc/opt/novell/certs
* Tue Apr 18 2006 mmj@novell.com
- Add /opt/novell/lib64
- Add /opt/novell/man/fr
- Add /opt/novell/man/fr/man8
- Remove /usr/novell
- Convert to BuildRequires: which then goes away since it's not
needed
* Wed Jun 29 2005 cgardner@novell.com
- ready for autobuild.