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