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