3 %bcond_without debuginfo # build without debuginfo package
5 # disable rpm generated debug package, we handle it differently here
6 %define _enable_debug_packages 0
8 # avoid rpm 4.4.9 adding rm -rf buildroot
9 %define __spec_clean_body %{nil}
10 Summary: Common directories
11 Summary(pl.UTF-8): Wspólne katalogi
17 BuildRequires: automake
19 Requires: FHS >= 2.3-15
20 Provides: browser-plugins(%{_target_base_arch})
22 Provides: browser-plugins(i386)
25 Provides: browser-plugins(ppc)
28 Provides: browser-plugins(s390)
31 Provides: browser-plugins(sparc)
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
41 This package contains common directories for packages that extend some
42 programs functionality, but don't require them themselves.
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.
49 Summary: Common directories for debug information
50 Summary(pl.UTF-8): Wspólne katalogi dla plików z informacjami dla debuggera
51 Group: Development/Debug
53 %description debuginfo
54 This package provides common directories for debug information.
56 %description debuginfo -l pl.UTF-8
57 Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla
64 rm -rf $RPM_BUILD_ROOT
67 $RPM_BUILD_ROOT/{initrd,selinux,sys} \
68 $RPM_BUILD_ROOT/etc/{pki,X11/xinit/xinitrc.d,certs,default,logrotate.d,security,sysconfig/wmstyle,tmpwatch,xdg/autostart} \
69 $RPM_BUILD_ROOT/home/{users,services} \
70 $RPM_BUILD_ROOT/lib/{firmware,security} \
71 $RPM_BUILD_ROOT/usr/include/security \
72 $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig,initrd} \
73 $RPM_BUILD_ROOT/usr/share/{gnome/{help,wm-properties},man/man{n,l},man/pl/mann,pkgconfig,sounds,themes/Default,wallpapers,xsessions} \
74 $RPM_BUILD_ROOT/usr/src/examples \
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}}
80 %if "%{_lib}" == "lib64"
82 $RPM_BUILD_ROOT/lib64/security \
83 $RPM_BUILD_ROOT/usr/lib64/pkgconfig \
84 $RPM_BUILD_ROOT/usr/lib64/browser-plugins \
85 $RPM_BUILD_ROOT/usr/lib64/initrd
90 $RPM_BUILD_ROOT/usr/lib/debug/%{_lib} \
91 $RPM_BUILD_ROOT/usr/lib/debug%{_libdir} \
92 $RPM_BUILD_ROOT/usr/lib/debug/{bin,sbin} \
93 $RPM_BUILD_ROOT/usr/lib/debug/usr/{bin,sbin} \
94 $RPM_BUILD_ROOT/usr/lib/debug/lib/security \
95 $RPM_BUILD_ROOT/usr/src/debug
97 %if "%{_lib}" == "lib64"
99 $RPM_BUILD_ROOT/usr/lib/debug/lib64/security
102 find $RPM_BUILD_ROOT/usr/lib/debug -type d | while read line; do
103 echo ${line#$RPM_BUILD_ROOT}
104 done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files
107 # create this for %clean
108 tar -cf checkfiles.tar -C $RPM_BUILD_ROOT .
111 mkdir -p $RPM_BUILD_ROOT
112 tar -xf checkfiles.tar -C $RPM_BUILD_ROOT
115 check_filesystem_dirs() {
116 RPMFILE=%{_rpmdir}/%{name}-%{version}-%{release}.%{_target_cpu}.rpm
117 RPMFILE2=%{?with_debuginfo:%{_rpmdir}/%{name}-debuginfo-%{version}-%{release}.%{_target_cpu}.rpm}
119 # note: we must exclude from check all existing dirs belonging to FHS
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
122 # find finds also '.', so use option -B for diff
123 rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | LC_ALL=C sort | diff -uB - $TMPFILE || :
128 check_filesystem_dirs
131 %defattr(644,root,root,755)
133 %dir /etc/X11/xinit/xinitrc.d
134 %attr(751,root,root) %dir /etc/certs
136 %attr(751,root,root) %dir /etc/security
137 %dir /etc/logrotate.d
139 %dir /etc/sysconfig/wmstyle
143 %dir /etc/xdg/autostart
145 %attr(751,root,adm) %dir /home/services
151 %dir /usr/include/security
152 %dir /usr/lib/ConsoleKit
153 %dir /usr/lib/ConsoleKit/run-session.d
154 %dir /usr/lib/browser-plugins
155 %dir /usr/lib/cgi-bin
157 %dir /usr/lib/pkgconfig
158 %dir /usr/share/gnome
159 %dir /usr/share/gnome/help
160 %dir /usr/share/gnome/wm-properties
161 %dir /usr/share/man/man[nl]
162 %lang(pl) %dir /usr/share/man/pl/mann
163 %dir /usr/share/pkgconfig
164 %dir /usr/share/sounds
165 %dir /usr/share/themes
166 %dir /usr/share/themes/Default
167 %dir /usr/share/wallpapers
168 %dir /usr/share/xsessions
169 %dir /usr/src/examples
170 %attr(700,root,root) %dir /var/lock/subsys
173 %dir %{_desktopdir}/docklets
179 %if "%{_lib}" == "lib64"
181 %dir /usr/lib64/browser-plugins
182 %dir /usr/lib64/initrd
183 %dir /usr/lib64/pkgconfig
186 %if %{with debuginfo}
188 %defattr(644,root,root,755)
193 /usr/src/debug/filesystem-debuginfo.files