-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: 5
-Copyright: Public Domain
+Version: 3.0
+Release: 6
+License: GPL
Group: Base
-Group(pl): Podstawowe
+Requires: FHS >= 2.3-14.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Prereq: setup
-Buildarch: noarch
%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,opt} \
- $RPM_BUILD_ROOT/etc/{X11,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} \
- $RPM_BUILD_ROOT/var/{games,state/misc,tmp,db,opt,crash,cache,account} \
- $RPM_BUILD_ROOT/var/cache \
- $RPM_BUILD_ROOT/usr/X11R6/share/applnk
-
-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
+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
-/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
-/var/cache
-%dir /var/state
-%dir /var/opt
-%attr(1777,root,root) %dir /var/tmp
+%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