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