]> git.pld-linux.org Git - packages/FHS.git/blame - FHS.spec
- read access to /srv for everybody
[packages/FHS.git] / FHS.spec
CommitLineData
2fccd05c
ER
1# NOTE
2# - don't use %{_*dir} macros for paths defined by FHS
3
4# avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency
5%define __spec_clean_body %{nil}
7807a3bf 6Summary: Basic FHS 2.3 filesystem layout
d280bbd7
ER
7Summary(de.UTF-8): Grundlegende Dateisystemstruktur
8Summary(fr.UTF-8): Arborescence de base du système de fichiers
9Summary(pl.UTF-8): Podstawowy układ katalogów systemu Linux zgodny z FHS 2.3
10Summary(tr.UTF-8): Temel dosya sistemi yapısı
b3b300be 11Name: FHS
7807a3bf 12Version: 2.3
7dea8115 13Release: 24
15c9b486 14License: GPL
15Group: Base
8eaadcf0 16URL: http://www.pathname.com/fhs/
2fccd05c 17BuildRequires: mktemp
73559f52 18BuildRequires: rpmbuild(macros) >= 1.213
e4b30691 19Requires: setup >= 2.4.6-4
8ad4c704 20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15c9b486 21
1a35d806 22%define _locmandir /usr/local/man
2fccd05c 23
6c95f275 24# doesn't contain any files, but we're not noarch package
99177468 25%define no_install_post_strip 1
6c95f275
ER
26%define no_install_post_chrpath 1
27%define no_install_post_compress_modules 1
0fa811e0 28
15c9b486 29%description
aac153be 30This package contains the basic directory layout for a Linux system,
31including the proper permissions for the directories. This layout
7807a3bf 32conforms to the Filesystem Hierarchy Standard (FHS) 2.3.
15c9b486 33
fdedb1f3
JR
34%description -l de.UTF-8
35Dieses Paket enthält die grundlegende Verzeichnisstruktur eines
36Linux-Systems, einschließlich der entsprechenden Zugriffsrechte. Diese
7807a3bf 37Struktur entspricht dem Filesystem Hierarchy Standard (FHS) 2.3.
15c9b486 38
fdedb1f3
JR
39%description -l fr.UTF-8
40Ce package contient l'arborescence type pour système Linux y compris
41les permissions adéquates pour les répertoires. Cette arborescence est
69503c43 42conforme au standard "Filesystem Hierarchy Standard" (FHS) 2.3.
15c9b486 43
fdedb1f3
JR
44%description -l pl.UTF-8
45Pakiet ten zawiera informacje o podstawowej strukturze katalogów
46systemu i praw dostępu do nich. Struktura katalogów jest zgodna z FHS
7807a3bf 472.3.
aac153be 48
fdedb1f3
JR
49%description -l tr.UTF-8
50Bu paket GNU makro işleme dilini içerir. Mantıksal olarak
51ayrıştırılabilen metin dosyaları yazımı için yararlıdır.
15c9b486 52
53%prep
54
55%install
56rm -rf $RPM_BUILD_ROOT
57
d8cf4cdf
JB
58install -d \
59 $RPM_BUILD_ROOT/{bin,boot,dev,etc,home,opt,srv} \
60 $RPM_BUILD_ROOT/etc/{X11,opt} \
61 $RPM_BUILD_ROOT/lib/modules \
7807a3bf 62 $RPM_BUILD_ROOT/{mnt,media/{cdrom,floppy},proc,root,sbin,tmp} \
d8cf4cdf 63 $RPM_BUILD_ROOT/usr/{bin,games,include,lib,sbin,share,src} \
017dd5c9 64 $RPM_BUILD_ROOT/usr/share/{dict,doc,games,info,misc,tmac,xml} \
d8cf4cdf
JB
65 $RPM_BUILD_ROOT/usr/lib/games \
66 $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,sbin,share/{doc,info},src} \
48784dc4 67 $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/misc,local,lock,log,mail,opt,run,spool,tmp,yp}
d8cf4cdf
JB
68
69%if "%{_lib}" == "lib64"
70install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
76796e14
JB
71%endif
72
45af740b 73for manp in man{1,2,3,4,5,6,7,8} ; do
d8cf4cdf 74 install -d $RPM_BUILD_ROOT/usr/share/man/${manp}
0fa811e0 75 install -d $RPM_BUILD_ROOT%{_locmandir}/${manp}
4890dc1c
JB
76 for mloc in bg ca cs da de el eo es fi fr gl hr hu id it ja ko lt nl \
77 pl pt pt_BR ro ru sk sl sr sv tr uk zh_CN zh_TW ; do
d8cf4cdf 78 install -d $RPM_BUILD_ROOT/usr/share/man/${mloc}/${manp}
0fa811e0 79 done
0fa811e0 80done
0fa811e0 81
d8cf4cdf 82# "/usr/local/share/man and /usr/local/man must be synonomous" per FHS 2.3
9d1c44e3
JB
83ln -sf ../man $RPM_BUILD_ROOT/usr/local/share/man
84
15c9b486 85%clean
fa9aa6bf 86cd $RPM_BUILD_ROOT
0a75495b 87
2fccd05c 88check_filesystem_dirs() {
2fccd05c
ER
89 RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
90 TMPFILE=$(mktemp)
48e57f98 91 find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort > $TMPFILE
2fccd05c
ER
92
93 # find finds also '.', so use option -B for diff
94 if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | LC_ALL=C sort | diff -uB $TMPFILE - ; then
95 rm -rf $RPM_BUILD_ROOT
96 else
97 echo -e "\nNot so good, some directories are not included in package\n"
98 exit 1
99 fi
100 rm -f $TMPFILE
101}
102check_filesystem_dirs
15c9b486 103
104%files
bfef5768 105%defattr(644,root,root,755)
52e00ac5 106%dir /
d8cf4cdf
JB
107%dir /bin
108%dir /boot
109%dir /dev
2d4f80d5 110%dir /etc
d8cf4cdf
JB
111%dir /etc/X11
112%dir /etc/opt
b9fc8087 113%dir /home
d8cf4cdf
JB
114%dir /lib
115%dir /lib/modules
7807a3bf 116%attr(775,root,disk) %dir /media
117%attr(775,root,disk) /media/floppy
118%attr(775,root,disk) /media/cdrom
d8cf4cdf
JB
119%dir /mnt
120%dir /opt
adf03d52 121%attr(555,root,proc) %verify(not group) /proc
15c9b486 122%attr(700,root,root) /root
123%dir /sbin
7dea8115 124%attr(755,root,root) /srv
15c9b486 125%attr(1777,root,root) /tmp
d8cf4cdf
JB
126%dir /usr
127%dir /usr/bin
128%dir /usr/games
129%dir /usr/include
130%dir /usr/lib
131%dir /usr/lib/games
132%dir /usr/sbin
133%dir /usr/share
134%dir /usr/share/dict
135%dir /usr/share/doc
136%dir /usr/share/games
137%dir /usr/share/info
d8cf4cdf
JB
138%dir /usr/share/man
139%dir /usr/share/man/man[1-8]
140%lang(bg) /usr/share/man/bg
fb84e090 141%lang(ca) /usr/share/man/ca
d8cf4cdf
JB
142%lang(cs) /usr/share/man/cs
143%lang(da) /usr/share/man/da
144%lang(de) /usr/share/man/de
145%lang(el) /usr/share/man/el
80d1ef5a 146%lang(eo) /usr/share/man/eo
d8cf4cdf
JB
147%lang(es) /usr/share/man/es
148%lang(fi) /usr/share/man/fi
149%lang(fr) /usr/share/man/fr
150%lang(gl) /usr/share/man/gl
151%lang(hr) /usr/share/man/hr
152%lang(hu) /usr/share/man/hu
153%lang(id) /usr/share/man/id
154%lang(it) /usr/share/man/it
155%lang(ja) /usr/share/man/ja
156%lang(ko) /usr/share/man/ko
4890dc1c 157%lang(lt) /usr/share/man/lt
d8cf4cdf
JB
158%lang(nl) /usr/share/man/nl
159%lang(pl) /usr/share/man/pl
160%lang(pt) /usr/share/man/pt
161%lang(pt_BR) /usr/share/man/pt_BR
162%lang(ro) /usr/share/man/ro
163%lang(ru) /usr/share/man/ru
164%lang(sl) /usr/share/man/sl
165%lang(sk) /usr/share/man/sk
166%lang(sr) /usr/share/man/sr
167%lang(sv) /usr/share/man/sv
168%lang(tr) /usr/share/man/tr
169%lang(uk) /usr/share/man/uk
170%lang(zh_CN) /usr/share/man/zh_CN
171%lang(zh_TW) /usr/share/man/zh_TW
172%dir /usr/share/misc
173%dir /usr/share/tmac
017dd5c9 174%dir /usr/share/xml
d8cf4cdf
JB
175%dir /usr/src
176%dir /usr/local
177%dir /usr/local/bin
178%dir /usr/local/etc
179%dir /usr/local/games
180%dir /usr/local/include
181%dir /usr/local/lib
182%dir /usr/local/sbin
183%dir /usr/local/share
184%dir /usr/local/share/doc
185%dir /usr/local/share/info
186/usr/local/share/man
0fa811e0 187%{_locmandir}
d8cf4cdf 188%dir /usr/local/src
15c9b486 189%dir /var
d8cf4cdf 190%dir /var/cache
0a75495b 191%dir /var/crash
15c9b486 192%dir /var/db
15c9b486 193%dir /var/games
dff2ec9d 194%dir /var/lib
0a75495b 195%dir /var/lib/misc
e7f27a78 196%dir /var/local
9a1c7481 197%attr(1771,root,uucp) %dir /var/lock
bd82a0d2 198%attr(751,root,root) /var/log
98c64a3c 199%attr(2775,root,mail) /var/mail
15c9b486 200%dir /var/opt
0a75495b 201%dir /var/run
2d4f80d5 202%dir /var/spool
48784dc4 203%dir /var/yp
15c9b486 204%attr(1777,root,root) %dir /var/tmp
d8cf4cdf
JB
205%if "%{_lib}" == "lib64"
206%dir /lib64
207%dir /usr/lib64
208%dir /usr/lib64/games
209%dir /usr/local/lib64
76796e14 210%endif
This page took 0.187865 seconds and 4 git commands to generate.