]> git.pld-linux.org Git - packages/filesystem.git/blame - filesystem.spec
- add missing dir creation
[packages/filesystem.git] / filesystem.spec
CommitLineData
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 10Summary: Common directories
7793e3d4 11Summary(pl.UTF-8): Wspólne katalogi
0604b7eb 12Name: filesystem
a28536a7 13Version: 3.0
c09a789c 14Release: 25
0604b7eb 15License: GPL
16Group: Base
55654d5c 17BuildRequires: automake
4de84d81 18BuildRequires: mktemp
df96336f 19Requires: FHS >= 2.3-15
74f9dc2c 20Provides: browser-plugins(%{_target_base_arch})
f705215d
JB
21%ifarch %{x8664}
22Provides: browser-plugins(i386)
23%endif
24%ifarch ppc64
25Provides: browser-plugins(ppc)
26%endif
27%ifarch s390x
28Provides: browser-plugins(s390)
29%endif
30%ifarch sparc64
31Provides: browser-plugins(sparc)
32%endif
0604b7eb 33BuildRoot: %{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
41This package contains common directories for packages that extend some
42programs functionality, but don't require them themselves.
0604b7eb 43
e9348c6a
JR
44%description -l pl.UTF-8
45Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzających
46funkcjonalność programów, ale nie wymagających ich.
0604b7eb 47
c4ce2dbd
PS
48%package debuginfo
49Summary: Common directories for debug information
7793e3d4 50Summary(pl.UTF-8): Wspólne katalogi dla plików z informacjami dla debuggera
c4ce2dbd 51Group: Development/Debug
c4ce2dbd
PS
52
53%description debuginfo
54This package provides common directories for debug information.
55
e9348c6a
JR
56%description debuginfo -l pl.UTF-8
57Ten pakiet udostępnia wspólne katalogi dla plików z informacjami dla
2b81e7e3
JB
58debuggera.
59
0604b7eb 60%prep
9c70a427 61%setup -qcT
0604b7eb 62
63%install
64rm -rf $RPM_BUILD_ROOT
65
df96336f
JB
66install -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 \
c09a789c 72 $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig,initrd,ConsoleKit/run-session.d} \
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"
81install -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}
89install -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 98install -d \
e1458798
ER
99 $RPM_BUILD_ROOT/usr/lib/debug/lib64/security
100%endif
101
102find $RPM_BUILD_ROOT/usr/lib/debug -type d | while read line; do
ccbc4d73 103 echo ${line#$RPM_BUILD_ROOT}
e1458798 104done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files
4a374292 105%endif
0604b7eb 106
9c70a427
ER
107# create this for %clean
108tar -cf checkfiles.tar -C $RPM_BUILD_ROOT .
109
0604b7eb 110%clean
9c70a427
ER
111mkdir -p $RPM_BUILD_ROOT
112tar -xf checkfiles.tar -C $RPM_BUILD_ROOT
0604b7eb 113cd $RPM_BUILD_ROOT
114
e1458798 115check_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 128check_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
74e3380c
PZ
152%dir /usr/lib/ConsoleKit
153%dir /usr/lib/ConsoleKit/run-session.d
f705215d 154%dir /usr/lib/browser-plugins
df96336f 155%dir /usr/lib/cgi-bin
2d989ca3 156%dir /usr/lib/initrd
4a374292 157%dir /usr/lib/pkgconfig
9b6ddd09 158%dir /usr/share/gnome
159%dir /usr/share/gnome/help
a43a22dd 160%dir /usr/share/gnome/wm-properties
df96336f
JB
161%dir /usr/share/man/man[nl]
162%lang(pl) %dir /usr/share/man/pl/mann
4a374292 163%dir /usr/share/pkgconfig
0604b7eb 164%dir /usr/share/sounds
165%dir /usr/share/themes
166%dir /usr/share/themes/Default
167%dir /usr/share/wallpapers
0604b7eb 168%dir /usr/share/xsessions
df96336f
JB
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
c7cd57d0 181%dir /usr/lib64/browser-plugins
2d989ca3
JR
182%dir /usr/lib64/initrd
183%dir /usr/lib64/pkgconfig
df96336f 184%endif
c4ce2dbd 185
ef4f4d70 186%if %{with debuginfo}
c4ce2dbd
PS
187%files debuginfo
188%defattr(644,root,root,755)
df96336f 189%dir /usr/lib/debug
a996419a 190/usr/lib/debug/*
e1458798 191
df96336f 192%dir /usr/src/debug
e1458798 193/usr/src/debug/filesystem-debuginfo.files
ef4f4d70 194%endif
This page took 0.116292 seconds and 4 git commands to generate.