]> git.pld-linux.org Git - packages/FHS.git/blame - FHS.spec
- pl for -debug
[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.
4e9a06c3
JB
5# But: root %attr+chown in %post means integrity verification (rpm -V) error.
6# Maybe use non-root %attr+numeric chown in %post (without setup dependency)? The only disadvantage
7# seems to be a warning message on install.
d6daf6dc 8Summary: Basic FHS 3.0 filesystem layout
d280bbd7
ER
9Summary(de.UTF-8): Grundlegende Dateisystemstruktur
10Summary(fr.UTF-8): Arborescence de base du système de fichiers
d6daf6dc 11Summary(pl.UTF-8): Podstawowy układ katalogów systemu Linux zgodny z FHS 3.0
d280bbd7 12Summary(tr.UTF-8): Temel dosya sistemi yapısı
b3b300be 13Name: FHS
4e9a06c3 14Version: 3.0
c446220a 15Release: 7
15c9b486 16License: GPL
17Group: Base
e38ba8ca 18URL: http://refspecs.linuxfoundation.org/fhs.shtml
4e9a06c3 19# list of languages for localized man pages directories
38ec8b96 20Source0: locale-dirs
2fccd05c 21BuildRequires: mktemp
73559f52 22BuildRequires: rpmbuild(macros) >= 1.213
05fbeea7 23Conflicts: setup < 2.7
8ad4c704 24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15c9b486 25
5a4e441c
ER
26# nothing to put there
27%define _enable_debug_packages 0
28
335736da
JB
29%if "%{_lib}" == "lib64"
30%define with_lib64 1
335736da
JB
31%endif
32%if "%{_lib}" == "libx32"
33%define with_libx32 1
57d439f5 34%define with_lib64 1
335736da
JB
35%else
36%ifarch %{x8664}
37# x32 as additional ABI
38%define with_libx32 1
39%endif
40%endif
41
5a4e441c
ER
42# avoid rpm 4.4.9 adding rm -rf buildroot, we need the dirs to check consistency
43%define __spec_clean_body %{nil}
44
6c95f275 45# doesn't contain any files, but we're not noarch package
483f43b7
JR
46%define no_install_post_strip 1
47%define no_install_post_chrpath 1
48%define no_install_post_compress_modules 1
0fa811e0 49
05fbeea7 50# we have to use numeric uids/groups. see comment above
05fbeea7
ER
51%define gid_uucp 14
52%define gid_mail 12
53
15c9b486 54%description
aac153be 55This package contains the basic directory layout for a Linux system,
56including the proper permissions for the directories. This layout
4e9a06c3 57conforms to the Filesystem Hierarchy Standard (FHS) %{version}.
15c9b486 58
fdedb1f3
JR
59%description -l de.UTF-8
60Dieses Paket enthält die grundlegende Verzeichnisstruktur eines
61Linux-Systems, einschließlich der entsprechenden Zugriffsrechte. Diese
4e9a06c3 62Struktur entspricht dem Filesystem Hierarchy Standard (FHS) %{version}.
15c9b486 63
fdedb1f3
JR
64%description -l fr.UTF-8
65Ce package contient l'arborescence type pour système Linux y compris
66les permissions adéquates pour les répertoires. Cette arborescence est
4e9a06c3 67conforme au standard "Filesystem Hierarchy Standard" (FHS) %{version}.
15c9b486 68
fdedb1f3
JR
69%description -l pl.UTF-8
70Pakiet ten zawiera informacje o podstawowej strukturze katalogów
71systemu i praw dostępu do nich. Struktura katalogów jest zgodna z FHS
4e9a06c3 72%{version}.
aac153be 73
483f43b7
JR
74%package debug
75Summary: Debug information directory hierarchy
9438c0df 76Summary(pl.UTF-8): Hierarchia katalogów dla informacji diagnostycznych
483f43b7
JR
77Group: Development/Debug
78
79%description debug
80This package provides directory hierarchy for debug information
81contained in debuginfo rpm packages.
82
9438c0df
JB
83%description debug -l pl.UTF-8
84Ten pakiet dostarcza hierarchię katalogów dla zawarych w pakietach
85RPM debuginfo informacji pozwalających na śledzenie programów.
86
15c9b486 87%prep
40188a0f 88%setup -qcT
c5fb118b 89cp -p %{SOURCE0} .
15c9b486 90
91%install
92rm -rf $RPM_BUILD_ROOT
93
d8cf4cdf 94install -d \
4e9a06c3 95 $RPM_BUILD_ROOT/{bin,boot,dev,etc,home,opt,run,srv,sys} \
d8cf4cdf
JB
96 $RPM_BUILD_ROOT/etc/{X11,opt} \
97 $RPM_BUILD_ROOT/lib/modules \
d13739ad 98 $RPM_BUILD_ROOT/{mnt,media,proc,root/tmp,sbin,tmp} \
17f3eba2 99 $RPM_BUILD_ROOT/usr/{bin,games,include,lib,libexec,sbin,share,src} \
4e9a06c3 100 $RPM_BUILD_ROOT/usr/share/{color/icc,dict,doc,games,info,misc,ppd,tmac,xml} \
d8cf4cdf 101 $RPM_BUILD_ROOT/usr/lib/games \
17f3eba2 102 $RPM_BUILD_ROOT/usr/local/{bin,etc,games,include,lib,libexec,sbin,share/{color/icc,doc,info,man},src} \
c5fb118b 103 $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/{color/icc,misc},local,lock,log,mail,opt,run,spool,tmp,yp}
d8cf4cdf 104
335736da 105%if %{with lib64}
d8cf4cdf 106install -d $RPM_BUILD_ROOT{/lib64,/usr/lib64/games,/usr/local/lib64}
9d2de01c 107%endif
335736da 108%if %{with libx32}
9d2de01c 109install -d $RPM_BUILD_ROOT{/libx32,/usr/libx32/games,/usr/local/libx32}
76796e14
JB
110%endif
111
42b7266a 112install -d $RPM_BUILD_ROOT/usr/share/man/man{1,2,3,4,5,6,7,8}
4e9a06c3 113install -d $RPM_BUILD_ROOT/usr/local/share/man/man{1,2,3,4,5,6,7,8}
9d1c44e3 114
483f43b7
JR
115for i in $(seq 0 255); do
116 install -d "$RPM_BUILD_ROOT$(printf '/usr/lib/.build-id/%02x' $i)"
117done
118
42b7266a
ER
119> %{name}.lang
120for mloc in $(cat locale-dirs); do
121 echo "%%lang($mloc) %dir /usr/share/man/${mloc}" >> %{name}.lang
122 for manp in man{1,2,3,4,5,6,7,8}; do
123 install -d $RPM_BUILD_ROOT/usr/share/man/${mloc}/${manp}
124 echo "%%lang($mloc) %dir /usr/share/man/${mloc}/${manp}" >> %{name}.lang
125 done
126done
127
15c9b486 128%clean
fa9aa6bf 129cd $RPM_BUILD_ROOT
0a75495b 130
2fccd05c 131check_filesystem_dirs() {
b68acde4 132 RPMFILES="%{_rpmdir}/%{name}-%{version}-%{release}.%{_target_cpu}.rpm %{_rpmdir}/%{name}-debug-%{version}-%{release}.%{_target_cpu}.rpm"
2fccd05c 133 TMPFILE=$(mktemp)
e75de10d 134 find | sed -e 's|^\.||g' -e '/^$/d' | LC_ALL=C sort > $TMPFILE
2fccd05c 135
b68acde4 136 if rpm -qpl $RPMFILES | grep -v '^/$' | LC_ALL=C sort | diff -u $TMPFILE - ; then
2fccd05c
ER
137 rm -rf $RPM_BUILD_ROOT
138 else
139 echo -e "\nNot so good, some directories are not included in package\n"
140 exit 1
141 fi
142 rm -f $TMPFILE
143}
144check_filesystem_dirs
15c9b486 145
4e9a06c3 146%pretrans -p <lua>
c5fb118b
JB
147st = posix.stat("/usr/local/share/man")
148if st and st.type == "link" then
149 os.remove("/usr/local/share/man")
150end
4e9a06c3 151
05fbeea7 152%post -p <lua>
c5fb118b 153--# XXX: it is 2009, what uucp?! but we use /var/lock/subsys, so change it just to root?
05fbeea7
ER
154posix.chown("/var/mail", 0, %{gid_mail})
155posix.chown("/var/lock", 0, %{gid_uucp})
156
42b7266a 157%files -f %{name}.lang
bfef5768 158%defattr(644,root,root,755)
52e00ac5 159%dir /
d8cf4cdf
JB
160%dir /bin
161%dir /boot
162%dir /dev
2d4f80d5 163%dir /etc
d8cf4cdf
JB
164%dir /etc/X11
165%dir /etc/opt
b9fc8087 166%dir /home
d8cf4cdf
JB
167%dir /lib
168%dir /lib/modules
d13739ad 169%dir /media
d8cf4cdf
JB
170%dir /mnt
171%dir /opt
6c511447
ER
172%dir %attr(555,root,root) %verify(not group) /proc
173%dir %attr(700,root,root) /root
ef2d028b 174%dir %attr(700,root,root) /root/tmp
4e9a06c3 175%dir /run
15c9b486 176%dir /sbin
6c511447 177%dir %attr(755,root,root) /srv
6ad28b92 178%dir %attr(555,root,root) /sys
6c511447 179%dir %attr(1777,root,root) /tmp
d8cf4cdf
JB
180%dir /usr
181%dir /usr/bin
182%dir /usr/games
183%dir /usr/include
184%dir /usr/lib
d49d853d 185%dir /usr/libexec
d8cf4cdf
JB
186%dir /usr/lib/games
187%dir /usr/sbin
188%dir /usr/share
4e9a06c3
JB
189%dir /usr/share/color
190%dir /usr/share/color/icc
d8cf4cdf
JB
191%dir /usr/share/dict
192%dir /usr/share/doc
193%dir /usr/share/games
194%dir /usr/share/info
d8cf4cdf
JB
195%dir /usr/share/man
196%dir /usr/share/man/man[1-8]
d8cf4cdf 197%dir /usr/share/misc
4e9a06c3 198%dir /usr/share/ppd
d8cf4cdf 199%dir /usr/share/tmac
017dd5c9 200%dir /usr/share/xml
d8cf4cdf
JB
201%dir /usr/src
202%dir /usr/local
203%dir /usr/local/bin
204%dir /usr/local/etc
205%dir /usr/local/games
206%dir /usr/local/include
207%dir /usr/local/lib
d49d853d 208%dir /usr/local/libexec
d8cf4cdf
JB
209%dir /usr/local/sbin
210%dir /usr/local/share
4e9a06c3
JB
211%dir /usr/local/share/color
212%dir /usr/local/share/color/icc
d8cf4cdf
JB
213%dir /usr/local/share/doc
214%dir /usr/local/share/info
4e9a06c3
JB
215%dir /usr/local/share/man
216%dir /usr/local/share/man/man[1-8]
d8cf4cdf 217%dir /usr/local/src
15c9b486 218%dir /var
d8cf4cdf 219%dir /var/cache
0a75495b 220%dir /var/crash
15c9b486 221%dir /var/db
15c9b486 222%dir /var/games
dff2ec9d 223%dir /var/lib
4e9a06c3
JB
224%dir /var/lib/color
225%dir /var/lib/color/icc
0a75495b 226%dir /var/lib/misc
e7f27a78 227%dir /var/local
6c511447
ER
228%dir %attr(1771,root,root) /var/lock
229%dir %attr(751,root,root) /var/log
230%dir %attr(2775,root,root) /var/mail
15c9b486 231%dir /var/opt
0a75495b 232%dir /var/run
2d4f80d5 233%dir /var/spool
48784dc4 234%dir /var/yp
6c511447 235%dir %attr(1777,root,root) /var/tmp
335736da 236%if %{with lib64}
d8cf4cdf
JB
237%dir /lib64
238%dir /usr/lib64
239%dir /usr/lib64/games
240%dir /usr/local/lib64
9d2de01c 241%endif
335736da 242%if %{with libx32}
9d2de01c
JR
243%dir /libx32
244%dir /usr/libx32
245%dir /usr/libx32/games
246%dir /usr/local/libx32
76796e14 247%endif
483f43b7
JR
248
249%files debug
250%defattr(644,root,root,755)
251%dir /usr/lib/.build-id
0685dbbb 252%dir /usr/lib/.build-id/[0-9a-f][0-9a-f]
This page took 0.129401 seconds and 4 git commands to generate.