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