-Summary: Basic filesystem layout
-Summary(de): Grundlegende Dateisystemstruktur
-Summary(fr): Arborescence de base du système de fichiers
-Summary(pl): Podstawa uk³ad katalogów systemu Linux
-Summary(tr): Temel dosya sistemi yapýsý
+#
+# TODO: move here from FHS.spec all dirs not covered by FHS, update descs
+#
+
+%define _enable_debug_packages 0
+
+Summary: Common directories
+Summary(pl): Wspólne katalogi
Name: filesystem
-Version: 1.5
-Release: 4
-Copyright: Public Domain
+Version: 3.0
+Release: 6
+License: GPL
Group: Base
-Group(pl): Podstawowe
-Buildroot: /tmp/%{name}-%{version}-root
-Prereq: setup
-Buildarch: noarch
+Requires: FHS >= 2.3-14.2
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-This package contains the basic directory layout for a Linux system,
-including the proper permissions for the directories. This layout conforms
-to the Filesystem Hierarchy Standard (FHS) 2.0.
+This package contains common directories for packages that extend
+some programs functionality, but don't require them themselves.
-%description -l de
-Dieses Paket enthält die grundlegende Verzeichnisstruktur eines Linux-Systems,
-einschließlich der entsprechenden Zugriffsrechte. Diese Struktur entspricht
-dem Filesystem Hierarchy Standard (FHS) 2.0.
+%description -l pl
+Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzaj±cych
+funkcjonalno¶æ programów, ale nie wymagaj±cych ich.
-%description -l fr
-Ce package contient l'arborescence type pour système linux
-y compris les permissions adéquates pour les répertoires. Cette
-arborescence est conforme au standard \"Filesystem Hierarchy Standard\"
-(FHS) 2.0.
+%package debuginfo
+Summary: Common directories for debug information
+Summary(pl): Wspólne katalogi dla plików z informacjami dla debuggera
+Group: Development/Debug
+Requires: %{name} = %{version}-%{release}
-%description -l pl
-Pakiet ten zawiera informacje o podstawowej strukturze katalogów systemu i
-praw dostêpu do nich.
-
-%description -l tr
-Bu paket GNU makro iþleme dilini içerir. Mantýksal olarak ayrýþtýrýlabilen
-metin dosyalarý yazýmý için yararlýdýr.
+%description debuginfo
+This package provides common directories for debug information.
+
+%description debuginfo -l pl
+Ten pakiet udostêpnia wspólne katalogi dla plików z informacjami dla
+debuggera.
%prep
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{bin,boot,home/{users,ftp,httpd},opt} \
- $RPM_BUILD_ROOT/etc/{X11/wmconfig,profile.d,security,opt} \
- $RPM_BUILD_ROOT/lib/{modules,security} \
- $RPM_BUILD_ROOT/{mnt/{floppy,cdrom},proc,root,sbin,tmp} \
- $RPM_BUILD_ROOT/usr/{bin,src,games,lib,include,sbin,share} \
- $RPM_BUILD_ROOT/usr/share/{dict,doc,info,man,misc,games,tmac} \
- $RPM_BUILD_ROOT/usr/local/{bin,games,share/{info,doc},man,lib,sbin,src} \
- $RPM_BUILD_ROOT/var/{lock/subsys,log,mail,run,spool/{mqueue,news,uucp,lpd}} \
- $RPM_BUILD_ROOT/var/{games,state/misc,tmp,db,opt,crash,cache,account} \
- $RPM_BUILD_ROOT/var/cache/{fonts,www}
-
-ln -sf share/man $RPM_BUILD_ROOT/usr/man
-ln -sf share/info $RPM_BUILD_ROOT/usr/info
-ln -sf state $RPM_BUILD_ROOT/var/lib
-ln -sf share/doc $RPM_BUILD_ROOT/usr/doc
-ln -sf share/doc $RPM_BUILD_ROOT/usr/local/doc
-ln -sf share/dict $RPM_BUILD_ROOT/usr/dict
-
-%pre
-if [ -e /usr/man ] && [ ! -L /usr/man ]; then
- mkdir -p /usr/share/man
- cp -a /usr/man/* /usr/share/man || :
- rm -rf /usr/man
-fi
-if [ -e /usr/info ] && [ ! -L /usr/info ]; then
- mkdir -p /usr/share/info
- cp -a /usr/info/* /usr/share/info || :
- rm -rf /usr/info
- ln -sf ../../../etc/info-dir /usr/share/info/dir
-fi
-if [ -e /usr/doc ] && [ ! -L /usr/doc ]; then
- mkdir -p /usr/share/doc
- cp -a /usr/doc/* /usr/share/doc || :
- rm -rf /usr/doc
-fi
-if [ -e /usr/local/doc ] && [ ! -L /usr/local/doc ]; then
- mkdir -p /usr/local/share/doc
- cp -a /usr/local/doc/* /usr/local/share/doc
- rm -rf /usr/local/doc
-fi
-if [ -e /usr/dict ] && [ ! -L /usr/dict ]; then
- mkdir -p /usr/share/dict
- cp -a /usr/dict/* /usr/share/dict || :
- rm -rf /usr/dict
-fi
-if [ -e /var/lib ] && [ ! -L /var/lib ]; then
- mkdir -p /var/state
- cp -a /var/lib/* /var/state
- rm -rf /var/lib
-fi
-
-%post
-if [ -L /var/tmp ]; then
- rm -rf /var/tmp
- mkdir -p /var/tmp
- chmod 1777 /var/tmp
-fi
+install -d $RPM_BUILD_ROOT/etc/{sysconfig,xdg} \
+ $RPM_BUILD_ROOT%{_prefix}/share/{gnome/help,icons,pixmaps,pkgconfig,sounds,themes/Default,wallpapers,wm-properties,xsessions} \
+ $RPM_BUILD_ROOT%{_prefix}/lib/debug \
+ $RPM_BUILD_ROOT%{_usrsrc}/debug \
+ $RPM_BUILD_ROOT{%{_aclocaldir},%{_pkgconfigdir}} \
+ $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d
+
+%if "%{_lib}" != "lib"
+install -d $RPM_BUILD_ROOT/usr/lib/pkgconfig
+%endif
%clean
+cd $RPM_BUILD_ROOT
+
+# %{_rpmfilename} is not expanded, so use
+# %{name}-%{version}-%{release}.%{buildarch}.rpm
+RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
+TMPFILE=%{name}-%{version}.tmp$$
+find . | sed -e 's|^\.||g' -e 's|^$||g' | sort | grep -v $TMPFILE > $TMPFILE
+
+# find finds also '.', so use option -B for diff
+rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | sort | diff -uB $TMPFILE - || :
+
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(755,root,root,755)
-/bin
-%attr(700,root,root) /boot
-%dir /etc
-%attr(750,root,root) %dir /etc/security
-%dir /etc/profile.d
-%dir /etc/opt
-%dir /etc/X11
-%dir /etc/X11/wmconfig
-/home
-/lib
-/mnt
-/opt
-%attr(555,root,root) /proc
-%attr(700,root,root) /root
-%dir /sbin
-%attr(1777,root,root) /tmp
-/usr
-%dir /var
-%dir /var/db
-%dir /var/account
-%dir /var/games
-/var/lock
-%attr(751,root,root) /var/log
-%dir /var/run
-%dir /var/crash
-%attr(1777,root,root) /var/mail
-/var/cache
-%attr(1777,root,root) /var/spool/mqueue
-%dir /var/spool/lpd
-%dir /var/spool/news
-%dir /var/spool/uucp
-%dir /var/state
-%dir /var/opt
-%attr(1777,root,root) %dir /var/tmp
-
-%changelog
-* Mon May 31 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-- added /usr/share/tmac, (for troff macros -- not distributed with groff)
-- removed /usr/share/fonts -- sorry, but not listed in FHS 2.0
-
- filesystem still uder construction ;)
-
-* Sun May 30 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-
-- /usr/local/man instead /usr/local/share/man
-- removed /var/cache/man -- now man correct provides it.
-- added /usr/src && removed /usr/etc
-- removed /usr/lib/games
-- added /usr/local/include
-
- Read FHS 2.0 for more details ...
-
-* Wed May 19 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.5-2]
-- spec based on RH spec,
-- modified by: Artur Frysiak <wiget@pld.org.pl>, Piotr Czerwiñski
- <pius@pld.org.pl>, Wojtek ¦lusarczyk <wojtek@shadow.eu.org> and Tomasz
- K³oczko <kloczek@rudy.mif.pg.gda.pl>.
+%defattr(644,root,root,755)
+%dir /etc/sysconfig
+%dir /etc/X11/xinit
+%dir /etc/X11/xinit/xinitrc.d
+%dir /etc/xdg
+%dir %{_pkgconfigdir}
+%if "%{_lib}" != "lib"
+%dir /usr/lib/pkgconfig
+%endif
+%dir %{_aclocaldir}
+%dir /usr/share/gnome
+%dir /usr/share/gnome/help
+%dir /usr/share/icons
+%dir /usr/share/pixmaps
+%dir /usr/share/pkgconfig
+%dir /usr/share/sounds
+%dir /usr/share/themes
+%dir /usr/share/themes/Default
+%dir /usr/share/wallpapers
+%dir /usr/share/wm-properties
+%dir /usr/share/xsessions
+
+%files debuginfo
+%defattr(644,root,root,755)
+%dir %{_prefix}/lib/debug
+%dir %{_usrsrc}/debug