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