2 # - don't use %{_*dir} macros for paths defined by FHS
4 Summary: Basic FHS 2.3 filesystem layout
5 Summary(de.UTF-8): Grundlegende Dateisystemstruktur
6 Summary(fr.UTF-8): Arborescence de base du système de fichiers
7 Summary(pl.UTF-8): Podstawowy układ katalogów systemu Linux zgodny z FHS 2.3
8 Summary(tr.UTF-8): Temel dosya sistemi yapısı
14 URL: http://www.pathname.com/fhs/
16 BuildRequires: rpmbuild(macros) >= 1.213
17 Requires: setup >= 2.4.6-4
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 # nothing to put there
21 %define _enable_debug_packages 0
23 # avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency
24 %define __spec_clean_body %{nil}
26 %define _locmandir /usr/local/man
28 # doesn't contain any files, but we're not noarch package
29 %define no_install_post_strip 1
30 %define no_install_post_chrpath 1
31 %define no_install_post_compress_modules 1
34 This package contains the basic directory layout for a Linux system,
35 including the proper permissions for the directories. This layout
36 conforms to the Filesystem Hierarchy Standard (FHS) 2.3.
38 %description -l de.UTF-8
39 Dieses Paket enthält die grundlegende Verzeichnisstruktur eines
40 Linux-Systems, einschließlich der entsprechenden Zugriffsrechte. Diese
41 Struktur entspricht dem Filesystem Hierarchy Standard (FHS) 2.3.
43 %description -l fr.UTF-8
44 Ce package contient l'arborescence type pour système Linux y compris
45 les permissions adéquates pour les répertoires. Cette arborescence est
46 conforme au standard "Filesystem Hierarchy Standard" (FHS) 2.3.
48 %description -l pl.UTF-8
49 Pakiet ten zawiera informacje o podstawowej strukturze katalogów
50 systemu i praw dostępu do nich. Struktura katalogów jest zgodna z FHS
53 %description -l tr.UTF-8
54 Bu paket GNU makro işleme dilini içerir. Mantıksal olarak
55 ayrıştırılabilen metin dosyaları yazımı için yararlıdır.
60 rm -rf $RPM_BUILD_ROOT
63 $RPM_BUILD_ROOT/{bin,boot,dev,etc,home,opt,srv} \
64 $RPM_BUILD_ROOT/etc/{X11,opt} \
65 $RPM_BUILD_ROOT/lib/modules \
66 $RPM_BUILD_ROOT/{mnt,media/{cdrom,floppy},proc,root,sbin,tmp} \
67 $RPM_BUILD_ROOT/usr/{bin,games,include,lib,sbin,share,src} \
68 $RPM_BUILD_ROOT/usr/share/{dict,doc,games,info,misc,tmac,xml} \
69 $RPM_BUILD_ROOT/usr/lib/games \
70 $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,sbin,share/{doc,info},src} \
71 $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/misc,local,lock,log,mail,opt,run,spool,tmp,yp}
73 %if "%{_lib}" == "lib64"
74 install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
77 for manp in man{1,2,3,4,5,6,7,8} ; do
78 install -d $RPM_BUILD_ROOT/usr/share/man/${manp}
79 install -d $RPM_BUILD_ROOT%{_locmandir}/${manp}
80 for mloc in bg ca cs da de el eo es fi fr gl hr hu id it ja ko lt nl \
81 pl pt pt_BR ro ru sk sl sr sv tr uk zh_CN zh_TW ; do
82 install -d $RPM_BUILD_ROOT/usr/share/man/${mloc}/${manp}
86 # "/usr/local/share/man and /usr/local/man must be synonomous" per FHS 2.3
87 ln -sf ../man $RPM_BUILD_ROOT/usr/local/share/man
92 check_filesystem_dirs() {
93 RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
95 find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort > $TMPFILE
97 # find finds also '.', so use option -B for diff
98 if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | LC_ALL=C sort | diff -uB $TMPFILE - ; then
99 rm -rf $RPM_BUILD_ROOT
101 echo -e "\nNot so good, some directories are not included in package\n"
106 check_filesystem_dirs
109 %defattr(644,root,root,755)
120 %attr(775,root,disk) %dir /media
121 %attr(775,root,disk) /media/floppy
122 %attr(775,root,disk) /media/cdrom
125 %attr(555,root,proc) %verify(not group) /proc
126 %attr(700,root,root) /root
128 %attr(755,root,root) /srv
129 %attr(1777,root,root) /tmp
140 %dir /usr/share/games
143 %dir /usr/share/man/man[1-8]
144 %lang(bg) /usr/share/man/bg
145 %lang(ca) /usr/share/man/ca
146 %lang(cs) /usr/share/man/cs
147 %lang(da) /usr/share/man/da
148 %lang(de) /usr/share/man/de
149 %lang(el) /usr/share/man/el
150 %lang(eo) /usr/share/man/eo
151 %lang(es) /usr/share/man/es
152 %lang(fi) /usr/share/man/fi
153 %lang(fr) /usr/share/man/fr
154 %lang(gl) /usr/share/man/gl
155 %lang(hr) /usr/share/man/hr
156 %lang(hu) /usr/share/man/hu
157 %lang(id) /usr/share/man/id
158 %lang(it) /usr/share/man/it
159 %lang(ja) /usr/share/man/ja
160 %lang(ko) /usr/share/man/ko
161 %lang(lt) /usr/share/man/lt
162 %lang(nl) /usr/share/man/nl
163 %lang(pl) /usr/share/man/pl
164 %lang(pt) /usr/share/man/pt
165 %lang(pt_BR) /usr/share/man/pt_BR
166 %lang(ro) /usr/share/man/ro
167 %lang(ru) /usr/share/man/ru
168 %lang(sl) /usr/share/man/sl
169 %lang(sk) /usr/share/man/sk
170 %lang(sr) /usr/share/man/sr
171 %lang(sv) /usr/share/man/sv
172 %lang(tr) /usr/share/man/tr
173 %lang(uk) /usr/share/man/uk
174 %lang(zh_CN) /usr/share/man/zh_CN
175 %lang(zh_TW) /usr/share/man/zh_TW
183 %dir /usr/local/games
184 %dir /usr/local/include
187 %dir /usr/local/share
188 %dir /usr/local/share/doc
189 %dir /usr/local/share/info
201 %attr(1771,root,uucp) %dir /var/lock
202 %attr(751,root,root) /var/log
203 %attr(2775,root,mail) /var/mail
208 %attr(1777,root,root) %dir /var/tmp
209 %if "%{_lib}" == "lib64"
212 %dir /usr/lib64/games
213 %dir /usr/local/lib64