]>
Commit | Line | Data |
---|---|---|
ef4f4d70 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without debuginfo # build without debuginfo package | |
c4ce2dbd | 4 | |
8487aa90 | 5 | # disable rpm generated debug package, we handle it differently here |
c4ce2dbd PS |
6 | %define _enable_debug_packages 0 |
7 | ||
9c70a427 ER |
8 | # avoid rpm 4.4.9 adding rm -rf buildroot |
9 | %define __spec_clean_body %{nil} | |
0604b7eb | 10 | Summary: Common directories |
7793e3d4 | 11 | Summary(pl.UTF-8): Wspólne katalogi |
0604b7eb | 12 | Name: filesystem |
a28536a7 | 13 | Version: 3.0 |
2d989ca3 | 14 | Release: 23 |
0604b7eb | 15 | License: GPL |
16 | Group: Base | |
55654d5c | 17 | BuildRequires: automake |
4de84d81 | 18 | BuildRequires: mktemp |
df96336f | 19 | Requires: FHS >= 2.3-15 |
74f9dc2c | 20 | Provides: browser-plugins(%{_target_base_arch}) |
f705215d JB |
21 | %ifarch %{x8664} |
22 | Provides: browser-plugins(i386) | |
23 | %endif | |
24 | %ifarch ppc64 | |
25 | Provides: browser-plugins(ppc) | |
26 | %endif | |
27 | %ifarch s390x | |
28 | Provides: browser-plugins(s390) | |
29 | %endif | |
30 | %ifarch sparc64 | |
31 | Provides: browser-plugins(sparc) | |
32 | %endif | |
0604b7eb | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
df96336f JB |
35 | # directory for "privilege separation" chroot |
36 | %define _privsepdir /usr/share/empty | |
37 | # directory for *.idl files (for CORBA implementations) | |
38 | %define _idldir /usr/share/idl | |
39 | ||
0604b7eb | 40 | %description |
74f9dc2c ER |
41 | This package contains common directories for packages that extend some |
42 | programs functionality, but don't require them themselves. | |
0604b7eb | 43 | |
e9348c6a JR |
44 | %description -l pl.UTF-8 |
45 | Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzających | |
46 | funkcjonalność programów, ale nie wymagających ich. | |
0604b7eb | 47 | |
c4ce2dbd PS |
48 | %package debuginfo |
49 | Summary: Common directories for debug information | |
7793e3d4 | 50 | Summary(pl.UTF-8): Wspólne katalogi dla plików z informacjami dla debuggera |
c4ce2dbd | 51 | Group: Development/Debug |
c4ce2dbd PS |
52 | |
53 | %description debuginfo | |
54 | This package provides common directories for debug information. | |
55 | ||
e9348c6a JR |
56 | %description debuginfo -l pl.UTF-8 |
57 | Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla | |
2b81e7e3 JB |
58 | debuggera. |
59 | ||
0604b7eb | 60 | %prep |
9c70a427 | 61 | %setup -qcT |
0604b7eb | 62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
df96336f JB |
66 | install -d \ |
67 | $RPM_BUILD_ROOT/{initrd,selinux,sys} \ | |
a18a7af0 | 68 | $RPM_BUILD_ROOT/etc/{pki,X11/xinit/xinitrc.d,certs,default,logrotate.d,security,sysconfig/wmstyle,tmpwatch,xdg/autostart} \ |
df96336f JB |
69 | $RPM_BUILD_ROOT/home/{users,services} \ |
70 | $RPM_BUILD_ROOT/lib/{firmware,security} \ | |
71 | $RPM_BUILD_ROOT/usr/include/security \ | |
2d989ca3 | 72 | $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig,initrd} \ |
a43a22dd | 73 | $RPM_BUILD_ROOT/usr/share/{gnome/{help,wm-properties},man/man{n,l},man/pl/mann,pkgconfig,sounds,themes/Default,wallpapers,xsessions} \ |
ef4f4d70 | 74 | $RPM_BUILD_ROOT/usr/src/examples \ |
df96336f JB |
75 | $RPM_BUILD_ROOT/var/lock/subsys \ |
76 | $RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/docklets,%{_iconsdir},%{_pixmapsdir}} \ | |
77 | $RPM_BUILD_ROOT%{_fontsdir}/{{100,75}dpi,OTF,Speedo,Type1/{afm,pfm},TTF,cyrillic,local,misc} \ | |
78 | $RPM_BUILD_ROOT{%{_idldir},%{_privsepdir}} | |
79 | ||
e1458798 ER |
80 | %if "%{_lib}" == "lib64" |
81 | install -d \ | |
82 | $RPM_BUILD_ROOT/lib64/security \ | |
83 | $RPM_BUILD_ROOT/usr/lib64/pkgconfig \ | |
2d989ca3 JR |
84 | $RPM_BUILD_ROOT/usr/lib64/browser-plugins \ |
85 | $RPM_BUILD_ROOT/usr/lib64/initrd | |
e1458798 ER |
86 | %endif |
87 | ||
ef4f4d70 ER |
88 | %if %{with debuginfo} |
89 | install -d \ | |
e1458798 | 90 | $RPM_BUILD_ROOT/usr/lib/debug/%{_lib} \ |
ef4f4d70 | 91 | $RPM_BUILD_ROOT/usr/lib/debug%{_libdir} \ |
ccbc4d73 ER |
92 | $RPM_BUILD_ROOT/usr/lib/debug/{bin,sbin} \ |
93 | $RPM_BUILD_ROOT/usr/lib/debug/usr/{bin,sbin} \ | |
e1458798 | 94 | $RPM_BUILD_ROOT/usr/lib/debug/lib/security \ |
ef4f4d70 | 95 | $RPM_BUILD_ROOT/usr/src/debug |
ef4f4d70 | 96 | |
3cc3a089 | 97 | %if "%{_lib}" == "lib64" |
f705215d | 98 | install -d \ |
e1458798 ER |
99 | $RPM_BUILD_ROOT/usr/lib/debug/lib64/security |
100 | %endif | |
101 | ||
102 | find $RPM_BUILD_ROOT/usr/lib/debug -type d | while read line; do | |
ccbc4d73 | 103 | echo ${line#$RPM_BUILD_ROOT} |
e1458798 | 104 | done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files |
4a374292 | 105 | %endif |
0604b7eb | 106 | |
9c70a427 ER |
107 | # create this for %clean |
108 | tar -cf checkfiles.tar -C $RPM_BUILD_ROOT . | |
109 | ||
0604b7eb | 110 | %clean |
9c70a427 ER |
111 | mkdir -p $RPM_BUILD_ROOT |
112 | tar -xf checkfiles.tar -C $RPM_BUILD_ROOT | |
0604b7eb | 113 | cd $RPM_BUILD_ROOT |
114 | ||
e1458798 | 115 | check_filesystem_dirs() { |
e1458798 ER |
116 | RPMFILE=%{_rpmdir}/%{name}-%{version}-%{release}.%{_target_cpu}.rpm |
117 | RPMFILE2=%{?with_debuginfo:%{_rpmdir}/%{name}-debuginfo-%{version}-%{release}.%{_target_cpu}.rpm} | |
118 | TMPFILE=$(mktemp) | |
119 | # note: we must exclude from check all existing dirs belonging to FHS | |
5c32aa61 | 120 | find | sed -e 's|^\.||g' -e 's|^$||g' | LC_ALL=C sort | grep -v $TMPFILE | grep -E -v '^/(etc|etc/X11|home|lib|lib64|usr|usr/include|usr/lib|usr/lib64|usr/share|usr/share/man|usr/share/man/pl|usr/src|var|var/lock)$' > $TMPFILE |
e1458798 ER |
121 | |
122 | # find finds also '.', so use option -B for diff | |
a18a7af0 | 123 | rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | LC_ALL=C sort | diff -uB - $TMPFILE || : |
0604b7eb | 124 | |
e1458798 ER |
125 | rm -f $TMPFILE |
126 | } | |
0604b7eb | 127 | |
e1458798 | 128 | check_filesystem_dirs |
0604b7eb | 129 | |
130 | %files | |
131 | %defattr(644,root,root,755) | |
eb44ff58 | 132 | %dir /etc/X11/xinit |
133 | %dir /etc/X11/xinit/xinitrc.d | |
df96336f | 134 | %attr(751,root,root) %dir /etc/certs |
b3a77873 | 135 | %dir /etc/default |
df96336f | 136 | %attr(751,root,root) %dir /etc/security |
a18a7af0 | 137 | %dir /etc/logrotate.d |
df96336f JB |
138 | %dir /etc/sysconfig |
139 | %dir /etc/sysconfig/wmstyle | |
24e29915 | 140 | %dir /etc/tmpwatch |
8487aa90 | 141 | %dir /etc/pki |
0604b7eb | 142 | %dir /etc/xdg |
d2fc9a97 | 143 | %dir /etc/xdg/autostart |
df96336f JB |
144 | %dir /home/users |
145 | %attr(751,root,adm) %dir /home/services | |
7bee3fbe | 146 | %dir /initrd |
df96336f JB |
147 | %dir /lib/firmware |
148 | %dir /lib/security | |
149 | %dir /selinux | |
150 | %dir /sys | |
151 | %dir /usr/include/security | |
f705215d | 152 | %dir /usr/lib/browser-plugins |
df96336f | 153 | %dir /usr/lib/cgi-bin |
2d989ca3 | 154 | %dir /usr/lib/initrd |
4a374292 | 155 | %dir /usr/lib/pkgconfig |
9b6ddd09 | 156 | %dir /usr/share/gnome |
157 | %dir /usr/share/gnome/help | |
a43a22dd | 158 | %dir /usr/share/gnome/wm-properties |
df96336f JB |
159 | %dir /usr/share/man/man[nl] |
160 | %lang(pl) %dir /usr/share/man/pl/mann | |
4a374292 | 161 | %dir /usr/share/pkgconfig |
0604b7eb | 162 | %dir /usr/share/sounds |
163 | %dir /usr/share/themes | |
164 | %dir /usr/share/themes/Default | |
165 | %dir /usr/share/wallpapers | |
0604b7eb | 166 | %dir /usr/share/xsessions |
df96336f JB |
167 | %dir /usr/src/examples |
168 | %attr(700,root,root) %dir /var/lock/subsys | |
169 | %dir %{_aclocaldir} | |
170 | %dir %{_desktopdir} | |
171 | %dir %{_desktopdir}/docklets | |
172 | %dir %{_iconsdir} | |
173 | %dir %{_pixmapsdir} | |
174 | %{_fontsdir} | |
175 | %dir %{_idldir} | |
176 | %dir %{_privsepdir} | |
177 | %if "%{_lib}" == "lib64" | |
178 | %dir /lib64/security | |
c7cd57d0 | 179 | %dir /usr/lib64/browser-plugins |
2d989ca3 JR |
180 | %dir /usr/lib64/initrd |
181 | %dir /usr/lib64/pkgconfig | |
df96336f | 182 | %endif |
c4ce2dbd | 183 | |
ef4f4d70 | 184 | %if %{with debuginfo} |
c4ce2dbd PS |
185 | %files debuginfo |
186 | %defattr(644,root,root,755) | |
df96336f | 187 | %dir /usr/lib/debug |
a996419a | 188 | /usr/lib/debug/* |
e1458798 | 189 | |
df96336f | 190 | %dir /usr/src/debug |
e1458798 | 191 | /usr/src/debug/filesystem-debuginfo.files |
ef4f4d70 | 192 | %endif |