]> git.pld-linux.org Git - packages/filesystem.git/blob - filesystem.spec
- nvm for th
[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:        19
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 Requires:       %{name} = %{version}-%{release}
53
54 %description debuginfo
55 This package provides common directories for debug information.
56
57 %description debuginfo -l pl.UTF-8
58 Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla
59 debuggera.
60
61 %prep
62 %setup -qcT
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 install -d \
68         $RPM_BUILD_ROOT/{initrd,selinux,sys} \
69         $RPM_BUILD_ROOT/etc/{pki,X11/xinit/xinitrc.d,certs,default,security,sysconfig/wmstyle,xdg/autostart} \
70         $RPM_BUILD_ROOT/home/{users,services} \
71         $RPM_BUILD_ROOT/lib/{firmware,security} \
72         $RPM_BUILD_ROOT/usr/include/security \
73         $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig} \
74         $RPM_BUILD_ROOT/usr/share/{gnome/help,man/man{n,l},man/pl/mann,pkgconfig,sounds,themes/Default,wallpapers,wm-properties,xsessions} \
75         $RPM_BUILD_ROOT/usr/src/examples \
76         $RPM_BUILD_ROOT/var/lock/subsys \
77         $RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/docklets,%{_iconsdir},%{_pixmapsdir}} \
78         $RPM_BUILD_ROOT%{_fontsdir}/{{100,75}dpi,OTF,Speedo,Type1/{afm,pfm},TTF,cyrillic,local,misc} \
79         $RPM_BUILD_ROOT{%{_idldir},%{_privsepdir}}
80
81 %if "%{_lib}" == "lib64"
82 install -d \
83         $RPM_BUILD_ROOT/lib64/security \
84         $RPM_BUILD_ROOT/usr/lib64/pkgconfig \
85         $RPM_BUILD_ROOT/usr/lib64/browser-plugins
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/sysconfig
138 %dir /etc/sysconfig/wmstyle
139 %dir /etc/pki
140 %dir /etc/xdg
141 %dir /etc/xdg/autostart
142 %dir /home/users
143 %attr(751,root,adm) %dir /home/services
144 %dir /initrd
145 %dir /lib/firmware
146 %dir /lib/security
147 %dir /selinux
148 %dir /sys
149 %dir /usr/include/security
150 %dir /usr/lib/browser-plugins
151 %dir /usr/lib/cgi-bin
152 %dir /usr/lib/pkgconfig
153 %dir /usr/share/gnome
154 %dir /usr/share/gnome/help
155 %dir /usr/share/man/man[nl]
156 %lang(pl) %dir /usr/share/man/pl/mann
157 %dir /usr/share/pkgconfig
158 %dir /usr/share/sounds
159 %dir /usr/share/themes
160 %dir /usr/share/themes/Default
161 %dir /usr/share/wallpapers
162 %dir /usr/share/wm-properties
163 %dir /usr/share/xsessions
164 %dir /usr/src/examples
165 %attr(700,root,root) %dir /var/lock/subsys
166 %dir %{_aclocaldir}
167 %dir %{_desktopdir}
168 %dir %{_desktopdir}/docklets
169 %dir %{_iconsdir}
170 %dir %{_pixmapsdir}
171 %{_fontsdir}
172 %dir %{_idldir}
173 %dir %{_privsepdir}
174 %if "%{_lib}" == "lib64"
175 %dir /lib64/security
176 %dir /usr/lib64/pkgconfig
177 %dir /usr/lib64/browser-plugins
178 %endif
179
180 %if %{with debuginfo}
181 %files debuginfo
182 %defattr(644,root,root,755)
183 %dir /usr/lib/debug
184 /usr/lib/debug/*
185
186 %dir /usr/src/debug
187 /usr/src/debug/filesystem-debuginfo.files
188 %endif
This page took 0.078878 seconds and 3 git commands to generate.