]> git.pld-linux.org Git - packages/filesystem.git/blob - filesystem.spec
- do not convert symlink on ac
[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:        33
12 License:        GPL
13 Group:          Base
14 BuildRequires:  automake
15 BuildRequires:  mktemp
16 BuildRequires:  rpm >= 4.4.9-56
17 Requires:       FHS >= 2.3-15
18 Provides:       browser-plugins(%{_target_base_arch})
19 %ifarch %{x8664}
20 Provides:       browser-plugins(i386)
21 %endif
22 %ifarch ppc64
23 Provides:       browser-plugins(ppc)
24 %endif
25 %ifarch s390x
26 Provides:       browser-plugins(s390)
27 %endif
28 %ifarch sparc64
29 Provides:       browser-plugins(sparc)
30 %endif
31 Provides:       filesystem-debuginfo = %{version}-%{release}
32 Obsoletes:      filesystem-debuginfo
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 # Adapter: This file does not like to be adapterized!
36
37 # directory for "privilege separation" chroot
38 %define         _privsepdir     /usr/share/empty
39 # directory for *.idl files (for CORBA implementations)
40 %define         _idldir         /usr/share/idl
41
42 %if "%{pld_release}" == "ac"
43 %define         _xmandir        /usr/X11R6/man
44 %endif
45
46 %description
47 This package contains common directories for packages that extend some
48 programs functionality, but don't require them themselves.
49
50 %description -l pl.UTF-8
51 Ten pakiet zawiera wspólne katalogi dla pakietów rozszerzających
52 funkcjonalność programów, ale nie wymagających ich.
53
54 %prep
55 %setup -qcT
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 install -d \
61         $RPM_BUILD_ROOT/{initrd,selinux,sys} \
62         $RPM_BUILD_ROOT/etc/{pki,X11/xinit/xinitrc.d,certs,default,logrotate.d,security,sysconfig/wmstyle,tmpwatch,xdg/autostart} \
63         $RPM_BUILD_ROOT/home/{users,services} \
64         $RPM_BUILD_ROOT/lib/{firmware,security} \
65         $RPM_BUILD_ROOT/usr/include/{security,X11} \
66         $RPM_BUILD_ROOT/usr/lib/{cgi-bin,browser-plugins,pkgconfig,initrd,ConsoleKit/run-session.d} \
67         $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} \
68         $RPM_BUILD_ROOT/usr/src/examples \
69         $RPM_BUILD_ROOT/var/lock/subsys \
70         $RPM_BUILD_ROOT{%{_aclocaldir},%{_desktopdir}/docklets,%{_iconsdir},%{_pixmapsdir}} \
71         $RPM_BUILD_ROOT%{_fontsdir}/{{100,75}dpi,OTF,Speedo,Type1/{afm,pfm},TTF,cyrillic,local,misc} \
72         $RPM_BUILD_ROOT{%{_idldir},%{_privsepdir}}
73
74 %if "%{_lib}" == "lib64"
75 install -d \
76         $RPM_BUILD_ROOT/lib64/security \
77         $RPM_BUILD_ROOT/usr/lib64/pkgconfig \
78         $RPM_BUILD_ROOT/usr/lib64/browser-plugins \
79         $RPM_BUILD_ROOT/usr/lib64/initrd
80 %endif
81
82 %if "%{pld_release}" == "ac"
83 # X11
84 install -d $RPM_BUILD_ROOT/usr/X11R6/share
85 for manp in man{1,2,3,4,5,6,7,8} ; do
86         install -d $RPM_BUILD_ROOT%{_xmandir}/$manp
87         for mloc in it ko pl; do
88                 install -d $RPM_BUILD_ROOT%{_xmandir}/$mloc/$manp
89         done
90 done
91 install -d $RPM_BUILD_ROOT/usr/share/wm-properties
92 %endif
93
94 install -d \
95         $RPM_BUILD_ROOT/usr/lib/debug/%{_lib} \
96         $RPM_BUILD_ROOT/usr/lib/debug%{_libdir} \
97         $RPM_BUILD_ROOT/usr/lib/debug/{bin,sbin} \
98         $RPM_BUILD_ROOT/usr/lib/debug/usr/{bin,sbin} \
99         $RPM_BUILD_ROOT/usr/lib/debug/lib/security \
100         $RPM_BUILD_ROOT/usr/src/debug
101
102 %if "%{_lib}" == "lib64"
103 install -d \
104         $RPM_BUILD_ROOT/usr/lib/debug/lib64/security
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 %if "%{pld_release}" != "ac"
131 %pretrans -p <lua>
132 -- this needs to be a dir
133 -- feel free to write in pure lua, but success on first install is not important.
134 os.execute("if [ -L /usr/include/X11 ]; then umask 022; mv -f /usr/include/X11{,.rpmsave}; mkdir -m755 -p /usr/include/X11 && mv -f /usr/include/X11.rpmsave/* /usr/include/X11; fi")
135 %endif
136
137 %files
138 %defattr(644,root,root,755)
139 %dir /etc/X11/xinit
140 %dir /etc/X11/xinit/xinitrc.d
141 %attr(751,root,root) %dir /etc/certs
142 %dir /etc/default
143 %attr(751,root,root) %dir /etc/security
144 %dir /etc/logrotate.d
145 %dir /etc/sysconfig
146 %dir /etc/sysconfig/wmstyle
147 %dir /etc/tmpwatch
148 %dir /etc/pki
149 %dir /etc/xdg
150 %dir /etc/xdg/autostart
151 %dir /home/users
152 %dir /home/services
153 %dir /initrd
154 %dir /lib/firmware
155 %dir /lib/security
156 %dir /selinux
157 %dir /sys
158 %dir /usr/include/X11
159 %dir /usr/include/security
160 %dir /usr/lib/ConsoleKit
161 %dir /usr/lib/ConsoleKit/run-session.d
162 %dir /usr/lib/browser-plugins
163 %dir /usr/lib/cgi-bin
164 %dir /usr/lib/initrd
165 %dir /usr/lib/pkgconfig
166 %dir /usr/share/backgrounds
167 %dir /usr/share/gnome
168 %dir /usr/share/gnome/help
169 %dir /usr/share/gnome/wm-properties
170 %dir /usr/share/man/man[nl]
171 %lang(pl) %dir /usr/share/man/pl/mann
172 %dir /usr/share/pkgconfig
173 %dir /usr/share/soundfonts
174 %dir /usr/share/sounds
175 %dir /usr/share/themes
176 %dir /usr/share/themes/Default
177 %dir /usr/share/wallpapers
178 %dir /usr/share/xsessions
179 %dir /usr/src/examples
180 %attr(700,root,root) %dir /var/lock/subsys
181 %dir %{_aclocaldir}
182 %dir %{_desktopdir}
183 %dir %{_desktopdir}/docklets
184 %dir %{_iconsdir}
185 %dir %{_pixmapsdir}
186 %{_fontsdir}
187 %dir %{_idldir}
188 %dir %{_privsepdir}
189 %if "%{_lib}" == "lib64"
190 %dir /lib64/security
191 %dir /usr/lib64/browser-plugins
192 %dir /usr/lib64/initrd
193 %dir /usr/lib64/pkgconfig
194 %endif
195
196 %if "%{pld_release}" == "ac"
197 %dir /usr/X11R6
198 %dir %{_xmandir}
199 %{_xmandir}/man*
200 %lang(it) %{_xmandir}/it
201 %lang(ko) %{_xmandir}/ko
202 %lang(pl) %{_xmandir}/pl
203 %dir /usr/X11R6/share
204
205 %dir /usr/share/wm-properties
206 %endif
207
208 # debuginfo
209 %dir /usr/lib/debug
210 /usr/lib/debug/*
211
212 %dir /usr/src/debug
This page took 0.067977 seconds and 4 git commands to generate.