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