]> git.pld-linux.org Git - packages/filesystem.git/blob - filesystem.spec
- /usr/share/soundfonts added
[packages/filesystem.git] / filesystem.spec
1
2 # disable rpm generated debug package, we handle it differently here
3 %define         _enable_debug_packages  0
4
5 # avoid rpm 4.4.9 adding rm -rf buildroot
6 %define         __spec_clean_body       %{nil}
7 Summary:        Common directories
8 Summary(pl.UTF-8):      Wspólne katalogi
9 Name:           filesystem
10 Version:        3.0
11 Release:        29
12 License:        GPL
13 Group:          Base
14 BuildRequires:  automake
15 BuildRequires:  mktemp
16 Requires:       FHS >= 2.3-15
17 Provides:       browser-plugins(%{_target_base_arch})
18 %ifarch %{x8664}
19 Provides:       browser-plugins(i386)
20 %endif
21 %ifarch ppc64
22 Provides:       browser-plugins(ppc)
23 %endif
24 %ifarch s390x
25 Provides:       browser-plugins(s390)
26 %endif
27 %ifarch sparc64
28 Provides:       browser-plugins(sparc)
29 %endif
30 Obsoletes:      filesystem-debuginfo
31 Provides:       filesystem-debuginfo = %{version}-%{release}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 # directory for "privilege separation" chroot
35 %define         _privsepdir     /usr/share/empty
36 # directory for *.idl files (for CORBA implementations)
37 %define         _idldir         /usr/share/idl
38
39 %description
40 This package contains common directories for packages that extend some
41 programs functionality, but don't require them themselves.
42
43 %description -l pl.UTF-8
44 Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzających
45 funkcjonalność programów, ale nie wymagających ich.
46
47 %prep
48 %setup -qcT
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 install -d \
54         $RPM_BUILD_ROOT/{initrd,selinux,sys} \
55         $RPM_BUILD_ROOT/etc/{pki,X11/xinit/xinitrc.d,certs,default,logrotate.d,security,sysconfig/wmstyle,tmpwatch,xdg/autostart} \
56         $RPM_BUILD_ROOT/home/{users,services} \
57         $RPM_BUILD_ROOT/lib/{firmware,security} \
58         $RPM_BUILD_ROOT/usr/include/security \
59         $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig,initrd,ConsoleKit/run-session.d} \
60         $RPM_BUILD_ROOT/usr/share/{backgrounds,gnome/{help,wm-properties},man/man{n,l},man/pl/mann,pkgconfig,sound{,font}s,themes/Default,wallpapers,xsessions} \
61         $RPM_BUILD_ROOT/usr/src/examples \
62         $RPM_BUILD_ROOT/var/lock/subsys \
63         $RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/docklets,%{_iconsdir},%{_pixmapsdir}} \
64         $RPM_BUILD_ROOT%{_fontsdir}/{{100,75}dpi,OTF,Speedo,Type1/{afm,pfm},TTF,cyrillic,local,misc} \
65         $RPM_BUILD_ROOT{%{_idldir},%{_privsepdir}}
66
67 %if "%{_lib}" == "lib64"
68 install -d \
69         $RPM_BUILD_ROOT/lib64/security \
70         $RPM_BUILD_ROOT/usr/lib64/pkgconfig \
71         $RPM_BUILD_ROOT/usr/lib64/browser-plugins \
72         $RPM_BUILD_ROOT/usr/lib64/initrd
73 %endif
74
75 install -d \
76         $RPM_BUILD_ROOT/usr/lib/debug/%{_lib} \
77         $RPM_BUILD_ROOT/usr/lib/debug%{_libdir} \
78         $RPM_BUILD_ROOT/usr/lib/debug/{bin,sbin} \
79         $RPM_BUILD_ROOT/usr/lib/debug/usr/{bin,sbin} \
80         $RPM_BUILD_ROOT/usr/lib/debug/lib/security \
81         $RPM_BUILD_ROOT/usr/src/debug
82
83 %if "%{_lib}" == "lib64"
84 install -d \
85         $RPM_BUILD_ROOT/usr/lib/debug/lib64/security
86 %endif
87
88 find $RPM_BUILD_ROOT/usr/lib/debug -type d | while read line; do
89         echo ${line#$RPM_BUILD_ROOT}
90 done > $RPM_BUILD_ROOT/usr/src/debug/%{name}-debuginfo.files
91
92 # create this for %clean
93 tar -cf checkfiles.tar -C $RPM_BUILD_ROOT .
94
95 %clean
96 mkdir -p $RPM_BUILD_ROOT
97 tar -xf checkfiles.tar -C $RPM_BUILD_ROOT
98 cd $RPM_BUILD_ROOT
99
100 check_filesystem_dirs() {
101         RPMFILE=%{_rpmdir}/%{name}-%{version}-%{release}.%{_target_cpu}.rpm
102         RPMFILE2=%{?with_debuginfo:%{_rpmdir}/%{name}-debuginfo-%{version}-%{release}.%{_target_cpu}.rpm}
103         TMPFILE=$(mktemp)
104         # note: we must exclude from check all existing dirs belonging to FHS
105         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
106
107         # find finds also '.', so use option -B for diff
108         rpm -qpl $RPMFILE $RPMFILE2 | grep -v '^/$' | LC_ALL=C sort | diff -uB - $TMPFILE || :
109
110         rm -f $TMPFILE
111 }
112
113 check_filesystem_dirs
114
115 %files
116 %defattr(644,root,root,755)
117 %dir /etc/X11/xinit
118 %dir /etc/X11/xinit/xinitrc.d
119 %attr(751,root,root) %dir /etc/certs
120 %dir /etc/default
121 %attr(751,root,root) %dir /etc/security
122 %dir /etc/logrotate.d
123 %dir /etc/sysconfig
124 %dir /etc/sysconfig/wmstyle
125 %dir /etc/tmpwatch
126 %dir /etc/pki
127 %dir /etc/xdg
128 %dir /etc/xdg/autostart
129 %dir /home/users
130 %attr(751,root,adm) %dir /home/services
131 %dir /initrd
132 %dir /lib/firmware
133 %dir /lib/security
134 %dir /selinux
135 %dir /sys
136 %dir /usr/include/security
137 %dir /usr/lib/ConsoleKit
138 %dir /usr/lib/ConsoleKit/run-session.d
139 %dir /usr/lib/browser-plugins
140 %dir /usr/lib/cgi-bin
141 %dir /usr/lib/initrd
142 %dir /usr/lib/pkgconfig
143 %dir /usr/share/backgrounds
144 %dir /usr/share/gnome
145 %dir /usr/share/gnome/help
146 %dir /usr/share/gnome/wm-properties
147 %dir /usr/share/man/man[nl]
148 %lang(pl) %dir /usr/share/man/pl/mann
149 %dir /usr/share/pkgconfig
150 %dir /usr/share/soundfonts
151 %dir /usr/share/sounds
152 %dir /usr/share/themes
153 %dir /usr/share/themes/Default
154 %dir /usr/share/wallpapers
155 %dir /usr/share/xsessions
156 %dir /usr/src/examples
157 %attr(700,root,root) %dir /var/lock/subsys
158 %dir %{_aclocaldir}
159 %dir %{_desktopdir}
160 %dir %{_desktopdir}/docklets
161 %dir %{_iconsdir}
162 %dir %{_pixmapsdir}
163 %{_fontsdir}
164 %dir %{_idldir}
165 %dir %{_privsepdir}
166 %if "%{_lib}" == "lib64"
167 %dir /lib64/security
168 %dir /usr/lib64/browser-plugins
169 %dir /usr/lib64/initrd
170 %dir /usr/lib64/pkgconfig
171 %endif
172
173 # debuginfo
174 %dir /usr/lib/debug
175 /usr/lib/debug/*
176
177 %dir /usr/src/debug
178 /usr/src/debug/filesystem-debuginfo.files
This page took 0.060449 seconds and 4 git commands to generate.