]> git.pld-linux.org Git - packages/FHS.git/blob - FHS.spec
- filesystem with common directories
[packages/FHS.git] / FHS.spec
1 Summary:        Basic FHS 2.3 filesystem layout
2 Summary(de):    Grundlegende Dateisystemstruktur
3 Summary(fr):    Arborescence de base du système de fichiers
4 Summary(pl):    Podstawowy uk³ad katalogów systemu Linux zgodny z FHS 2.3
5 Summary(tr):    Temel dosya sistemi yapýsý
6 Name:           FHS
7 Version:        2.3
8 Release:        14.2
9 License:        GPL
10 Group:          Base
11 URL:            http://www.pathname.com/fhs/
12 BuildRequires:  rpmbuild(macros) >= 1.213
13 Requires:       setup >= 2.4.6-4
14 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15
16 %define         _locmandir      /usr/local/man
17 # directory for "privilege separation" chroot
18 %define         _privsepdir     /usr/share/empty
19 # directory for *.idl files (for CORBA implementations)
20 %define         _idldir         /usr/share/idl
21
22 %description
23 This package contains the basic directory layout for a Linux system,
24 including the proper permissions for the directories. This layout
25 conforms to the Filesystem Hierarchy Standard (FHS) 2.3.
26
27 %description -l de
28 Dieses Paket enthält die grundlegende Verzeichnisstruktur eines
29 Linux-Systems, einschließlich der entsprechenden Zugriffsrechte. Diese
30 Struktur entspricht dem Filesystem Hierarchy Standard (FHS) 2.3.
31
32 %description -l fr
33 Ce package contient l'arborescence type pour système Linux y compris
34 les permissions adéquates pour les répertoires. Cette arborescence est
35 conforme au standard "Filesystem Hierarchy Standard" (FHS) 2.3.
36
37 %description -l pl
38 Pakiet ten zawiera informacje o podstawowej strukturze katalogów
39 systemu i praw dostêpu do nich. Struktura katalogów jest zgodna z FHS
40 2.3.
41
42 %description -l tr
43 Bu paket GNU makro iþleme dilini içerir. Mantýksal olarak
44 ayrýþtýrýlabilen metin dosyalarý yazýmý için yararlýdýr.
45
46 %prep
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50
51 install -d $RPM_BUILD_ROOT/{bin,boot,initrd,dev,etc,home/{users,services},opt,selinux,srv,sys} \
52         $RPM_BUILD_ROOT%{_sysconfdir}/{X11,certs,opt,security} \
53         $RPM_BUILD_ROOT{/lib/{firmware,modules},/%{_lib}/security} \
54         $RPM_BUILD_ROOT/{mnt,media/{cdrom,floppy},proc,root,sbin,tmp} \
55         $RPM_BUILD_ROOT%{_prefix}/{bin,games,include/security,lib/cgi-bin,sbin,share,src/examples} \
56         $RPM_BUILD_ROOT%{_datadir}/{applications,dict,doc,games,info,misc,tmac} \
57         $RPM_BUILD_ROOT%{_libdir}/games \
58         $RPM_BUILD_ROOT%{_prefix}/local/{bin,etc,games,include,lib,sbin,share/{doc,info},src} \
59         $RPM_BUILD_ROOT/var/{lock/subsys,log,mail,run,spool} \
60         $RPM_BUILD_ROOT/var/{cache,crash,db,games,lib/misc,local,opt,tmp} \
61         $RPM_BUILD_ROOT%{_idldir} \
62         $RPM_BUILD_ROOT%{_fontsdir}/{100,75}dpi \
63         $RPM_BUILD_ROOT%{_fontsdir}/OTF \
64         $RPM_BUILD_ROOT%{_fontsdir}/Speedo \
65         $RPM_BUILD_ROOT%{_fontsdir}/Type1/{afm,pfm} \
66         $RPM_BUILD_ROOT%{_fontsdir}/TTF \
67         $RPM_BUILD_ROOT%{_fontsdir}/cyrillic \
68         $RPM_BUILD_ROOT%{_fontsdir}/local \
69         $RPM_BUILD_ROOT%{_fontsdir}/misc \
70         $RPM_BUILD_ROOT%{_privsepdir}
71
72 %ifarch %{x8664} ppc64 s390x sparc64
73 install -d $RPM_BUILD_ROOT{/lib64,%{_prefix}/lib64,%{_prefix}/local/lib64}
74 %endif
75
76 for manp in man{1,2,3,4,5,6,7,8} ; do
77         install -d $RPM_BUILD_ROOT%{_mandir}/${manp}
78         install -d $RPM_BUILD_ROOT%{_locmandir}/${manp}
79         for mloc in bg cs da de el es fi fr gl hr hu id it ja ko nl pl pt \
80                     pt_BR ro ru sk sl sr sv tr uk zh_CN zh_TW ; do
81                 install -d $RPM_BUILD_ROOT%{_mandir}/${mloc}/${manp}
82         done
83 done
84 install -d $RPM_BUILD_ROOT%{_mandir}/man{n,l}
85 install -d $RPM_BUILD_ROOT%{_mandir}/pl/mann
86
87 ln -sf ../man $RPM_BUILD_ROOT/usr/local/share/man
88
89 %clean
90 cd $RPM_BUILD_ROOT
91
92 # %{_rpmfilename} is not expanded, so use
93 # %{name}-%{version}-%{release}.%{buildarch}.rpm
94 RPMFILE=%{name}-%{version}-%{release}.%{_target_cpu}.rpm
95 TMPFILE=%{name}-%{version}.tmp$$
96 find . | sed -e 's|^\.||g' -e 's|^$||g' | sort | grep -v $TMPFILE > $TMPFILE
97
98 # find finds also '.', so use option -B for diff
99 if rpm -qpl %{_rpmdir}/$RPMFILE | grep -v '^/$' | sort | diff -uB $TMPFILE - ; then
100         rm -rf $RPM_BUILD_ROOT
101 else
102         echo -e "\nNot so good, some directories are not included in package\n"
103         exit 1;
104 fi
105
106 %files
107 %defattr(644,root,root,755)
108 %dir /
109 /bin
110 /boot
111 /initrd
112 /dev
113 %dir /etc
114 %dir %{_sysconfdir}/X11
115 %attr(751,root,root) %dir /etc/certs
116 %dir %{_sysconfdir}/opt
117 %attr(751,root,root) %dir /etc/security
118 %dir /home
119 /home/users
120 %attr(751,root,adm) /home/services
121 /lib
122 %attr(775,root,disk) %dir /media
123 %attr(775,root,disk) /media/floppy
124 %attr(775,root,disk) /media/cdrom
125 /mnt
126 /opt
127 %attr(555,root,proc) %verify(not group) /proc
128 %attr(700,root,root) /root
129 %dir /sbin
130 %dir /sys
131 %dir /selinux
132 %attr(751,root,root) /srv
133 %attr(1777,root,root) /tmp
134 %dir %{_prefix}
135 %{_prefix}/bin
136 %{_prefix}/games
137 %{_prefix}/include
138 %{_prefix}/lib
139 %{_prefix}/sbin
140 %dir %{_prefix}/share
141 %{_datadir}/applications
142 %{_datadir}/dict
143 %{_datadir}/doc
144 %{_privsepdir}
145 %{_fontsdir}
146 %{_idldir}
147 %{_datadir}/games
148 %{_datadir}/info
149 %dir %{_mandir}
150 %dir %{_mandir}/man*
151 %lang(bg) %{_mandir}/bg
152 %lang(cs) %{_mandir}/cs
153 %lang(da) %{_mandir}/da
154 %lang(de) %{_mandir}/de
155 %lang(el) %{_mandir}/el
156 %lang(es) %{_mandir}/es
157 %lang(fi) %{_mandir}/fi
158 %lang(fr) %{_mandir}/fr
159 %lang(gl) %{_mandir}/gl
160 %lang(hr) %{_mandir}/hr
161 %lang(hu) %{_mandir}/hu
162 %lang(id) %{_mandir}/id
163 %lang(it) %{_mandir}/it
164 %lang(ja) %{_mandir}/ja
165 %lang(ko) %{_mandir}/ko
166 %lang(nl) %{_mandir}/nl
167 %lang(pl) %{_mandir}/pl
168 %lang(pt) %{_mandir}/pt
169 %lang(pt_BR) %{_mandir}/pt_BR
170 %lang(ro) %{_mandir}/ro
171 %lang(ru) %{_mandir}/ru
172 %lang(sl) %{_mandir}/sl
173 %lang(sk) %{_mandir}/sk
174 %lang(sr) %{_mandir}/sr
175 %lang(sv) %{_mandir}/sv
176 %lang(tr) %{_mandir}/tr
177 %lang(uk) %{_mandir}/uk
178 %lang(zh_CN) %{_mandir}/zh_CN
179 %lang(zh_TW) %{_mandir}/zh_TW
180 %{_datadir}/misc
181 %{_datadir}/tmac
182 %dir %{_prefix}/lib/cgi-bin
183 %{_prefix}/src
184 %dir %{_prefix}/local
185 %{_prefix}/local/bin
186 %{_prefix}/local/etc
187 %{_prefix}/local/games
188 %{_prefix}/local/include
189 %{_prefix}/local/lib
190 %{_prefix}/local/sbin
191 %dir %{_prefix}/local/share
192 %{_prefix}/local/share/doc
193 %{_prefix}/local/share/man
194 %{_prefix}/local/share/info
195 %{_locmandir}
196 %{_prefix}/local/src
197 %dir /var
198 /var/cache
199 %dir /var/crash
200 %dir /var/db
201 %dir /var/games
202 %dir /var/lib
203 %dir /var/lib/misc
204 %dir /var/local
205 %attr(1771,root,uucp) %dir /var/lock
206 %attr(700,root,root) %dir /var/lock/subsys
207 %attr(751,root,root) /var/log
208 %attr(2775,root,mail) /var/mail
209 %dir /var/opt
210 %dir /var/run
211 %dir /var/spool
212 %attr(1777,root,root) %dir /var/tmp
213
214 %ifarch ppc64 sparc64 x86_64
215 /lib64
216 %{_prefix}/lib64
217 %{_prefix}/local/lib64
218 %endif
This page took 0.066991 seconds and 3 git commands to generate.