Logoj0ke.net Open Build Service > Projects > J0KE.NET:Tools > deb > deb.spec
Sign Up | Log In

File deb.spec of Package deb

x
 
1
#
2
# spec file for package deb (Version 1.15.5.2)
3
#
4
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
# norootforbuild
19
20
%define debhelper_ver 7.4.8
21
%define devscripts_ver 2.10.58
22
23
Name:           deb
24
BuildRequires:  gcc-c++ ncurses-devel zlib-devel
25
%if 0%{?suse_version} > 1010
26
BuildRequires:  fdupes
27
%endif
28
Url:            http://www.debian.org
29
License:        GPLv2+
30
Group:          System/Packages
31
PreReq:         /bin/touch
32
Provides:       dpkg dpkg-dev debhelper dselect dpkg-doc devscripts
33
Requires:       perl = %{perl_version}
34
Requires:       cpio patch make html2text
35
AutoReqProv:    on
36
Version:        1.15.5.2
37
Release:        2
38
Summary:        Tools for Debian Packages
39
Source:         dpkg_%{version}.tar.bz2
40
Source1:        debhelper_%{debhelper_ver}.tar.bz2
41
Source2:        devscripts_%{devscripts_ver}.tar.bz2
42
Source3:        sensible-editor
43
Patch0:         debhelper-no-localized-manpages.diff
44
Patch1:         devscripts-buildfix.diff
45
Patch2:         debhelper-pod2man-no-utf8.patch
46
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
47
%if 0%{?suse_version} < 1120
48
%define _libexecdir /usr/lib
49
%endif
50
51
%if 0%{?suse_version}
52
BuildRequires:  sgmltool texlive-latex update-alternatives libbz2-devel
53
Requires:       update-alternatives
54
%if 0%{?suse_version} > 1100
55
BuildRequires:  libselinux-devel
56
%define use_selinux 1
57
%endif
58
%endif
59
%if 0%{?fedora_version}
60
BuildRequires:  libselinux-devel tetex-latex texinfo-tex linuxdoc-tools
61
%define use_selinux 1
62
%endif
63
%if 0%{?rhel_version}
64
BuildRequires:  libselinux-devel tetex-latex texinfo-tex linuxdoc-tools
65
%define use_selinux 1
66
%endif
67
%if 0%{?centos_version}
68
BuildRequires:  libselinux-devel tetex-latex texinfo-tex linuxdoc-tools
69
%define use_selinux 1
70
%endif
71
72
%description
73
This package contains tools for working with Debian packages. It makes
74
it possible to create and extract Debian packages. If Alien is
75
installed, the packages can be converted to RPMs.
76
77
This package contains the following Debian packages: dpkg, dselect,
78
dpkg-doc, dpkg-dev, debhelper, and devscripts.
79
80
81
%lang_package
82
%prep
83
%setup -q -n dpkg-%{version} -b 1 -b 2
84
pushd ..
85
%patch0
86
%if 0%{?suse_version} < 1130
87
%patch2
88
%endif
89
pushd devscripts-%{devscripts_ver}
90
%patch1 -p1
91
popd
92
popd
93
# update arch table
94
sed -n '/linux-gnu/ s/linux-gnu/suse-linux/p' debian/archtable > debian/archtable.tmp
95
cat debian/archtable.tmp >> debian/archtable
96
rm debian/archtable.tmp
97
98
%build
99
%{?suse_update_config:%{suse_update_config -f}}
100
export CFLAGS="$RPM_OPT_FLAGS"
101
%if 0%{?use_selinux}
102
export SELINUX_LIBS="-lselinux"
103
%endif
104
%configure\
105
%if 0%{?use_selinux}
106
    --with-selinux \
107
%endif
108
    --localstatedir=%{_localstatedir}/lib\
109
    --libdir=%{_prefix}/lib
110
# configure somehow does not detect architecture correctly in OBS (bnc#469337), so 
111
# let's do an awful hack and fix it in config.h
112
%ifarch x86_64
113
sed -i 's/^#define ARCHITECTURE ""/#define ARCHITECTURE "amd64"/' config.h
114
%endif
115
%ifarch %ix86
116
sed -i 's/^#define ARCHITECTURE ""/#define ARCHITECTURE "i386"/' config.h
117
%endif
118
%ifarch ppc powerpc
119
sed -i 's/^#define ARCHITECTURE ""/#define ARCHITECTURE "powerpc"/' config.h
120
%endif
121
%ifarch ppc64 powerpc64
122
sed -i 's/^#define ARCHITECTURE ""/#define ARCHITECTURE "ppc64"/' config.h
123
%endif
124
make %{?_smp_mflags}
125
# This makes debhelper man pages
126
cd ../debhelper
127
make %{?_smp_mflags} VERSION='%{debhelper_ver}'
128
##
129
# devscripts
130
##
131
# need dpkg-parsechangelog for devscripts
132
export PATH="$RPM_BUILD_DIR/dpkg-%{version}/scripts:$PATH"
133
export PERL5LIB="$RPM_BUILD_DIR/dpkg-%{version}/scripts"
134
cd ../devscripts-%{devscripts_ver}
135
make %{?_smp_mflags}
136
137
%install
138
#mkdir -p $RPM_BUILD_ROOT/usr/share
139
#ln -s $RPM_BUILD_ROOT/usr/share $RPM_BUILD_ROOT/share
140
##
141
# dpkg stuff
142
##
143
%__make DESTDIR=%{buildroot} install
144
# locales
145
%{find_lang} dpkg
146
%{find_lang} dselect
147
%{find_lang} dpkg-dev
148
cat dpkg.lang dselect.lang dpkg-dev.lang > %{name}.lang
149
# docs
150
install -d -m 755 $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
151
install -m 644 ABOUT-NLS $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
152
install -m 644 AUTHORS $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
153
install -m 644 COPYING $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
154
install -m 644 doc/triggers.txt $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
155
install -m 644 INSTALL $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
156
install -m 644 NEWS $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
157
install -m 644 README* $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
158
install -m 644 THANKS $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
159
install -m 644 TODO $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
160
install -m 644 debian/changelog $RPM_BUILD_ROOT/%{_docdir}/deb/dpkg
161
##
162
# debhelper stuff
163
##
164
cd ../debhelper
165
# autoscripts
166
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/debhelper/autoscripts
167
install -m 644 autoscripts/* $RPM_BUILD_ROOT%{_datadir}/debhelper/autoscripts
168
# perl modules:
169
install -d -m 755 $RPM_BUILD_ROOT%{perl_vendorlib}/Debian/Debhelper
170
install -d -m 755 $RPM_BUILD_ROOT%{perl_vendorlib}/Debian/Debhelper/Sequence
171
install -m 644 Debian/Debhelper/Sequence/*.pm $RPM_BUILD_ROOT%{perl_vendorlib}/Debian/Debhelper/Sequence
172
install -m 644 Debian/Debhelper/*.pm $RPM_BUILD_ROOT%{perl_vendorlib}/Debian/Debhelper
173
# docs:
174
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/deb/debhelper/examples
175
install -m 644 examples/* $RPM_BUILD_ROOT%{_docdir}/deb/debhelper/examples
176
install -m 644 doc/* $RPM_BUILD_ROOT%{_docdir}/deb/debhelper
177
install -m 644 debian/{changelog,copyright} $RPM_BUILD_ROOT%{_docdir}/deb/debhelper
178
# man pages:
179
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
180
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man7
181
install -m 644 *.1 $RPM_BUILD_ROOT%{_mandir}/man1
182
install -m 644 debhelper.7 $RPM_BUILD_ROOT%{_mandir}/man7
183
# binaries:
184
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
185
install -m 755 dh_*[^1-9] $RPM_BUILD_ROOT%{_bindir}
186
##
187
# devscripts
188
##
189
cd ../devscripts-%{devscripts_ver}
190
make install DESTDIR=$RPM_BUILD_ROOT
191
##
192
# extras
193
##
194
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}
195
##
196
# remove update-alternatives stuff (included in separate package)
197
##
198
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives
199
rm -rf $RPM_BUILD_ROOT%{_localstatedir}/lib/dpkg/alternatives
200
rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives
201
rm -rf $RPM_BUILD_ROOT%{_sbindir}/update-alternatives
202
rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/update-alternatives.8
203
rm -rf $RPM_BUILD_ROOT%{_mandir}/*/man8/update-alternatives.8
204
##
205
# remove duplicate files
206
##
207
%if 0%{?suse_version} > 1010
208
%fdupes %buildroot
209
%endif
210
211
%clean
212
rm -rf $RPM_BUILD_ROOT
213
214
%post
215
cd %{_localstatedir}/lib/dpkg
216
for f in diversions statoverride status ; do
217
    [ ! -f $f ] && touch $f
218
done
219
exit 0
220
221
%if 0%{?suse_version} > 1010
222
%files lang -f %{name}.lang
223
%endif
224
225
%files
226
%defattr(-,root,root)
227
%doc %{_docdir}/deb
228
%doc %{_mandir}/man*/*
229
%dir %{_sysconfdir}/dpkg
230
%config(noreplace) %{_sysconfdir}/dpkg/*
231
%{_bindir}/*
232
%{_sbindir}/*
233
%{_prefix}/lib/dpkg
234
%{_datadir}/dpkg
235
%{_localstatedir}/lib/dpkg
236
%{_datadir}/debhelper
237
%{perl_vendorlib}/Debian
238
%{perl_vendorlib}/Dpkg
239
%{perl_vendorlib}/Dpkg.pm
240
%{_libexecdir}/devscripts
241
%{_datadir}/devscripts
242
243
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
244
%{_datadir}/locale/ast/LC_MESSAGES/dpkg.mo
245
%{_datadir}/locale/bs/LC_MESSAGES/dpkg.mo
246
%{_datadir}/locale/bs/LC_MESSAGES/dselect.mo
247
%{_datadir}/locale/ca/LC_MESSAGES/dpkg-dev.mo
248
%{_datadir}/locale/ca/LC_MESSAGES/dpkg.mo
249
%{_datadir}/locale/ca/LC_MESSAGES/dselect.mo
250
%{_datadir}/locale/cs/LC_MESSAGES/dpkg.mo
251
%{_datadir}/locale/cs/LC_MESSAGES/dselect.mo
252
%{_datadir}/locale/da/LC_MESSAGES/dpkg.mo
253
%{_datadir}/locale/da/LC_MESSAGES/dselect.mo
254
%{_datadir}/locale/de/LC_MESSAGES/dpkg-dev.mo
255
%{_datadir}/locale/de/LC_MESSAGES/dpkg.mo
256
%{_datadir}/locale/de/LC_MESSAGES/dselect.mo
257
%{_datadir}/locale/dz/LC_MESSAGES/dpkg.mo
258
%{_datadir}/locale/el/LC_MESSAGES/dpkg.mo
259
%{_datadir}/locale/el/LC_MESSAGES/dselect.mo
260
%{_datadir}/locale/eo/LC_MESSAGES/dpkg.mo
261
%{_datadir}/locale/es/LC_MESSAGES/dpkg.mo
262
%{_datadir}/locale/es/LC_MESSAGES/dselect.mo
263
%{_datadir}/locale/et/LC_MESSAGES/dpkg.mo
264
%{_datadir}/locale/et/LC_MESSAGES/dselect.mo
265
%{_datadir}/locale/eu/LC_MESSAGES/dpkg.mo
266
%{_datadir}/locale/eu/LC_MESSAGES/dselect.mo
267
%{_datadir}/locale/fr/LC_MESSAGES/dpkg-dev.mo
268
%{_datadir}/locale/fr/LC_MESSAGES/dpkg.mo
269
%{_datadir}/locale/fr/LC_MESSAGES/dselect.mo
270
%{_datadir}/locale/gl/LC_MESSAGES/dpkg.mo
271
%{_datadir}/locale/gl/LC_MESSAGES/dselect.mo
272
%{_datadir}/locale/hu/LC_MESSAGES/dpkg.mo
273
%{_datadir}/locale/hu/LC_MESSAGES/dselect.mo
274
%{_datadir}/locale/id/LC_MESSAGES/dpkg.mo
275
%{_datadir}/locale/id/LC_MESSAGES/dselect.mo
276
%{_datadir}/locale/it/LC_MESSAGES/dpkg.mo
277
%{_datadir}/locale/it/LC_MESSAGES/dselect.mo
278
%{_datadir}/locale/ja/LC_MESSAGES/dpkg.mo
279
%{_datadir}/locale/ja/LC_MESSAGES/dselect.mo
280
%{_datadir}/locale/km/LC_MESSAGES/dpkg.mo
281
%{_datadir}/locale/ko/LC_MESSAGES/dpkg.mo
282
%{_datadir}/locale/ko/LC_MESSAGES/dselect.mo
283
%{_datadir}/locale/ku/LC_MESSAGES/dpkg.mo
284
%{_datadir}/locale/lt/LC_MESSAGES/dpkg.mo
285
%{_datadir}/locale/mr/LC_MESSAGES/dpkg.mo
286
%{_datadir}/locale/nb/LC_MESSAGES/dpkg.mo
287
%{_datadir}/locale/nb/LC_MESSAGES/dselect.mo
288
%{_datadir}/locale/ne/LC_MESSAGES/dpkg.mo
289
%{_datadir}/locale/nl/LC_MESSAGES/dpkg.mo
290
%{_datadir}/locale/nl/LC_MESSAGES/dselect.mo
291
%{_datadir}/locale/nn/LC_MESSAGES/dpkg.mo
292
%{_datadir}/locale/nn/LC_MESSAGES/dselect.mo
293
%{_datadir}/locale/pa/LC_MESSAGES/dpkg.mo
294
%{_datadir}/locale/pl/LC_MESSAGES/dpkg-dev.mo
295
%{_datadir}/locale/pl/LC_MESSAGES/dpkg.mo
296
%{_datadir}/locale/pl/LC_MESSAGES/dselect.mo
297
%{_datadir}/locale/pt/LC_MESSAGES/dpkg.mo
298
%{_datadir}/locale/pt/LC_MESSAGES/dselect.mo
299
%{_datadir}/locale/pt_BR/LC_MESSAGES/dpkg.mo
300
%{_datadir}/locale/pt_BR/LC_MESSAGES/dselect.mo
301
%{_datadir}/locale/ro/LC_MESSAGES/dpkg.mo
302
%{_datadir}/locale/ro/LC_MESSAGES/dselect.mo
303
%{_datadir}/locale/ru/LC_MESSAGES/dpkg-dev.mo
304
%{_datadir}/locale/ru/LC_MESSAGES/dpkg.mo
305
%{_datadir}/locale/ru/LC_MESSAGES/dselect.mo
306
%{_datadir}/locale/sk/LC_MESSAGES/dpkg.mo
307
%{_datadir}/locale/sk/LC_MESSAGES/dselect.mo
308
%{_datadir}/locale/sv/LC_MESSAGES/dpkg-dev.mo
309
%{_datadir}/locale/sv/LC_MESSAGES/dpkg.mo
310
%{_datadir}/locale/sv/LC_MESSAGES/dselect.mo
311
%{_datadir}/locale/th/LC_MESSAGES/dpkg.mo
312
%{_datadir}/locale/tl/LC_MESSAGES/dpkg.mo
313
%{_datadir}/locale/tl/LC_MESSAGES/dselect.mo
314
%{_datadir}/locale/vi/LC_MESSAGES/dpkg.mo
315
%{_datadir}/locale/vi/LC_MESSAGES/dselect.mo
316
%{_datadir}/locale/zh_CN/LC_MESSAGES/dpkg.mo
317
%{_datadir}/locale/zh_CN/LC_MESSAGES/dselect.mo
318
%{_datadir}/locale/zh_TW/LC_MESSAGES/dpkg.mo
319
%{_datadir}/locale/zh_TW/LC_MESSAGES/dselect.mo
320
%endif
321
%changelog
322