3 %bcond_without debuginfo # build without debuginfo package
5 # disable bcond if debuginfo is disabled from rpmmacros
6 %if %{expand:%%define __sip_%{?_enable_debug_packages} 1}0%{?__sip_0:1}%{expand:%%undefine __sip_%{?_enable_debug_packages}}
7 %undefine with_debuginfo
10 # disable rpm generated debug package in any way
11 %define _enable_debug_packages 0
13 # avoid rpm 4.4.9 adding rm -rf buildroot
14 %define __spec_clean_body %{nil}
15 Summary: Common directories
16 Summary(pl.UTF-8): Wspólne katalogi
22 BuildRequires: automake
23 Requires: FHS >= 2.3-15
24 Provides: browser-plugins(%{_target_base_arch})
26 Provides: browser-plugins(i386)
29 Provides: browser-plugins(ppc)
32 Provides: browser-plugins(s390)
35 Provides: browser-plugins(sparc)
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 # directory for "privilege separation" chroot
40 %define _privsepdir /usr/share/empty
41 # directory for *.idl files (for CORBA implementations)
42 %define _idldir /usr/share/idl
45 This package contains common directories for packages that extend some
46 programs functionality, but don't require them themselves.
48 %description -l pl.UTF-8
49 Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzających
50 funkcjonalność programów, ale nie wymagających ich.
53 Summary: Common directories for debug information
54 Summary(pl.UTF-8): Wspólne katalogi dla plików z informacjami dla debuggera
55 Group: Development/Debug
56 Requires: %{name} = %{version}-%{release}
58 %description debuginfo
59 This package provides common directories for debug information.
61 %description debuginfo -l pl.UTF-8
62 Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla
69 rm -rf $RPM_BUILD_ROOT
72 $RPM_BUILD_ROOT/{initrd,selinux,sys} \
73 $RPM_BUILD_ROOT/etc/{X11/xinit/xinitrc.d,certs,security,sysconfig/wmstyle,xdg/autostart} \
74 $RPM_BUILD_ROOT/home/{users,services} \
75 $RPM_BUILD_ROOT/lib/{firmware,security} \
76 $RPM_BUILD_ROOT/usr/include/security \
77 $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig} \
78 $RPM_BUILD_ROOT/usr/share/{gnome/help,man/man{n,l},man/pl/mann,pkgconfig,sounds,themes/Default,wallpapers,wm-properties,xsessions} \
79 $RPM_BUILD_ROOT/usr/src/examples \
80 $RPM_BUILD_ROOT/var/lock/subsys \
81 $RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/docklets,%{_iconsdir},%{_pixmapsdir}} \
82 $RPM_BUILD_ROOT%{_fontsdir}/{{100,75}dpi,OTF,Speedo,Type1/{afm,pfm},TTF,cyrillic,local,misc} \
83 $RPM_BUILD_ROOT{%{_idldir},%{_privsepdir}}
85 %if "%{_lib}" == "lib64"
87 $RPM_BUILD_ROOT/lib64/security \
88 $RPM_BUILD_ROOT/usr/lib64/pkgconfig \
89 $RPM_BUILD_ROOT/usr/lib64/browser-plugins
94 $RPM_BUILD_ROOT/usr/lib/debug/%{_lib} \
95 $RPM_BUILD_ROOT/usr/lib/debug%{_libdir} \
96 $RPM_BUILD_ROOT/usr/lib/debug/lib/security \
97 $RPM_BUILD_ROOT/usr/src/debug
99 %if "%{_lib}" == "lib64"
101 $RPM_BUILD_ROOT/usr/lib/debug/lib64/security
104 find $RPM_BUILD_ROOT/usr/lib/debug -type d | while read line; do
105 echo "%exclude %dir ${line#$RPM_BUILD_ROOT}"
106 done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files
109 # create this for %clean
110 tar -cf checkfiles.tar -C $RPM_BUILD_ROOT .
113 mkdir -p $RPM_BUILD_ROOT
114 tar -xf checkfiles.tar -C $RPM_BUILD_ROOT
117 check_filesystem_dirs() {
118 # %{_rpmfilename} is not expanded, so use
119 # %{name}-%{version}-%{release}.%{buildarch}.rpm
120 RPMFILE=%{_rpmdir}/%{name}-%{version}-%{release}.%{_target_cpu}.rpm
121 RPMFILE2=%{?with_debuginfo:%{_rpmdir}/%{name}-debuginfo-%{version}-%{release}.%{_target_cpu}.rpm}
123 # note: we must exclude from check all existing dirs belonging to FHS
124 find . | sed -e 's|^\.||g' -e 's|^$||g' | 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
126 # find finds also '.', so use option -B for diff
127 rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | sort | diff -uB $TMPFILE - || :
132 check_filesystem_dirs
135 %defattr(644,root,root,755)
137 %dir /etc/X11/xinit/xinitrc.d
138 %attr(751,root,root) %dir /etc/certs
139 %attr(751,root,root) %dir /etc/security
141 %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/browser-plugins
153 %dir /usr/lib/cgi-bin
154 %dir /usr/lib/pkgconfig
155 %dir /usr/share/gnome
156 %dir /usr/share/gnome/help
157 %dir /usr/share/man/man[nl]
158 %lang(pl) %dir /usr/share/man/pl/mann
159 %dir /usr/share/pkgconfig
160 %dir /usr/share/sounds
161 %dir /usr/share/themes
162 %dir /usr/share/themes/Default
163 %dir /usr/share/wallpapers
164 %dir /usr/share/wm-properties
165 %dir /usr/share/xsessions
166 %dir /usr/src/examples
167 %attr(700,root,root) %dir /var/lock/subsys
170 %dir %{_desktopdir}/docklets
176 %if "%{_lib}" == "lib64"
178 %dir /usr/lib64/pkgconfig
179 %dir /usr/lib64/browser-plugins
182 %if %{with debuginfo}
184 %defattr(644,root,root,755)
189 /usr/src/debug/filesystem-debuginfo.files