]> git.pld-linux.org Git - packages/filesystem.git/blob - filesystem.spec
3f6e36afb038bdfd18fd7f228b07ded69112bbab
[packages/filesystem.git] / filesystem.spec
1 #
2 # Conditional build:
3 %bcond_without  debuginfo       # build without debuginfo package
4
5 # disable rpm generated debug package, we handle it differently here
6 %define         _enable_debug_packages  0
7
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
12 Name:           filesystem
13 Version:        3.0
14 Release:        24
15 License:        GPL
16 Group:          Base
17 BuildRequires:  automake
18 BuildRequires:  mktemp
19 Requires:       FHS >= 2.3-15
20 Provides:       browser-plugins(%{_target_base_arch})
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
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
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
40 %description
41 This package contains common directories for packages that extend some
42 programs functionality, but don't require them themselves.
43
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.
47
48 %package debuginfo
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
52
53 %description debuginfo
54 This package provides common directories for debug information.
55
56 %description debuginfo -l pl.UTF-8
57 Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla
58 debuggera.
59
60 %prep
61 %setup -qcT
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 install -d \
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}}
79
80 %if "%{_lib}" == "lib64"
81 install -d \
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
86 %endif
87
88 %if %{with debuginfo}
89 install -d \
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
96
97 %if "%{_lib}" == "lib64"
98 install -d \
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
103         echo ${line#$RPM_BUILD_ROOT}
104 done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files
105 %endif
106
107 # create this for %clean
108 tar -cf checkfiles.tar -C $RPM_BUILD_ROOT .
109
110 %clean
111 mkdir -p $RPM_BUILD_ROOT
112 tar -xf checkfiles.tar -C $RPM_BUILD_ROOT
113 cd $RPM_BUILD_ROOT
114
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}
118         TMPFILE=$(mktemp)
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
121
122         # find finds also '.', so use option -B for diff
123         rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | LC_ALL=C sort | diff -uB - $TMPFILE || :
124
125         rm -f $TMPFILE
126 }
127
128 check_filesystem_dirs
129
130 %files
131 %defattr(644,root,root,755)
132 %dir /etc/X11/xinit
133 %dir /etc/X11/xinit/xinitrc.d
134 %attr(751,root,root) %dir /etc/certs
135 %dir /etc/default
136 %attr(751,root,root) %dir /etc/security
137 %dir /etc/logrotate.d
138 %dir /etc/sysconfig
139 %dir /etc/sysconfig/wmstyle
140 %dir /etc/tmpwatch
141 %dir /etc/pki
142 %dir /etc/xdg
143 %dir /etc/xdg/autostart
144 %dir /home/users
145 %attr(751,root,adm) %dir /home/services
146 %dir /initrd
147 %dir /lib/firmware
148 %dir /lib/security
149 %dir /selinux
150 %dir /sys
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
156 %dir /usr/lib/initrd
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
171 %dir %{_aclocaldir}
172 %dir %{_desktopdir}
173 %dir %{_desktopdir}/docklets
174 %dir %{_iconsdir}
175 %dir %{_pixmapsdir}
176 %{_fontsdir}
177 %dir %{_idldir}
178 %dir %{_privsepdir}
179 %if "%{_lib}" == "lib64"
180 %dir /lib64/security
181 %dir /usr/lib64/browser-plugins
182 %dir /usr/lib64/initrd
183 %dir /usr/lib64/pkgconfig
184 %endif
185
186 %if %{with debuginfo}
187 %files debuginfo
188 %defattr(644,root,root,755)
189 %dir /usr/lib/debug
190 /usr/lib/debug/*
191
192 %dir /usr/src/debug
193 /usr/src/debug/filesystem-debuginfo.files
194 %endif
This page took 0.174173 seconds and 2 git commands to generate.