1 |
blino |
25078 |
# hardcoded so that build from another distro keeps this name |
2 |
|
|
# (mandatory to have correct package name and source name) |
3 |
blino |
25060 |
%define _real_vendor mageia |
4 |
blino |
3459 |
|
5 |
blino |
3384 |
%if %{?distsuffix:0}%{?!distsuffix:1} |
6 |
blino |
3486 |
%define distsuffix .mga |
7 |
blino |
3384 |
%endif |
8 |
|
|
|
9 |
|
|
%if %{?mkrel:0}%{?!mkrel:1} |
10 |
blino |
3487 |
%define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release}%{?subrel:.%subrel} |
11 |
blino |
3384 |
%endif |
12 |
|
|
|
13 |
|
|
# This can be useful for backport, as rpm-4.2 |
14 |
|
|
# provides the emacs-spec mode |
15 |
|
|
%define have_emacsmodespec 1 |
16 |
|
|
|
17 |
|
|
%{?_with_emacsspecmode: %define have_emacsmodespec 1} |
18 |
|
|
%{?_without_emacsspecmode: %define have_emacsmodespec 0} |
19 |
|
|
|
20 |
blino |
3406 |
Summary: The %{distribution} rpm configuration and scripts |
21 |
blino |
25060 |
Name: rpm-%{_real_vendor}-setup |
22 |
anssi |
188160 |
Version: 1.147 |
23 |
colin |
274043 |
Release: %mkrel 12 |
24 |
tmb |
47647 |
Source0: %{name}-%{version}.tar.xz |
25 |
tmb |
233577 |
#Source1: rpm-helper.req |
26 |
dmorgan |
188288 |
# Patch that need a review |
27 |
dmorgan |
187548 |
Patch1: rpm-mageia-setup-1.145-fix-rpm49-build.patch |
28 |
dmorgan |
188288 |
# Patches already in mageia svn |
29 |
|
|
Patch2: rpm-mageia-setup-1.147-add-osgi-maven-support.patch |
30 |
|
|
Patch3: rpm-mageia-setup-1.147-Use-upstream-desktop-file.prov.patch |
31 |
dmorgan |
189248 |
Patch4: rpm-mageia-setup-1.147-Better-handle-maven-prov.patch |
32 |
dmorgan |
208317 |
Patch5: rpm-mageia-setup-1.147-Better-handle-osgi-prov.patch |
33 |
tmb |
209755 |
Patch6: rpm-mageia-setup-1.147-kmod.prov-handle-xz.patch |
34 |
tmb |
233577 |
#Patch7: rpm-mageia-setup-1.147-systemd-require-versioned-rpm-helper.patch |
35 |
kamil |
264252 |
# Patch not reviewed |
36 |
kamil |
264251 |
Patch8: %{name}-1.147-fix-rename-macro.patch |
37 |
colin |
274043 |
Patch9: %{name}-1.147-unitdir.patch |
38 |
blino |
3384 |
License: GPLv2+ |
39 |
|
|
Group: System/Configuration/Packaging |
40 |
tmb |
24937 |
Url: http://www.mageia.org/ |
41 |
blino |
3384 |
BuildRequires: rpm-devel |
42 |
tv |
264691 |
%rename rpm-mandriva-setup |
43 |
blino |
3384 |
|
44 |
|
|
%description |
45 |
blino |
3406 |
The %{distribution} rpm configuration and scripts. |
46 |
blino |
3384 |
|
47 |
|
|
%package build |
48 |
|
|
Group: System/Configuration/Packaging |
49 |
blino |
3406 |
Summary: The %{distribution} rpm configuration and scripts to build rpms |
50 |
blino |
3404 |
Requires: spec-helper |
51 |
misc |
142547 |
Requires: multiarch-utils |
52 |
|
|
# needed for script to extract pkgconfig info |
53 |
blino |
3384 |
Requires: pkgconfig |
54 |
|
|
Requires: python-pkg-resources |
55 |
blino |
201807 |
Requires: rpmlint-mageia-policy |
56 |
blino |
3384 |
Requires: %name = %version-%release |
57 |
blino |
3404 |
# for product version macros |
58 |
misc |
142548 |
Requires: %{_real_vendor}-release |
59 |
tv |
264691 |
%rename rpm-mandriva-setup-build |
60 |
blino |
3384 |
|
61 |
|
|
%description build |
62 |
blino |
3406 |
The %{distribution} rpm configuration and scripts dedicated to build rpms. |
63 |
blino |
3384 |
|
64 |
|
|
%prep |
65 |
|
|
%setup -q |
66 |
dmorgan |
187548 |
%patch1 -p0 |
67 |
dmorgan |
188288 |
%patch2 -p0 |
68 |
|
|
%patch3 -p0 |
69 |
dmorgan |
189248 |
%patch4 -p0 |
70 |
dmorgan |
208317 |
%patch5 -p0 |
71 |
tmb |
209755 |
%patch6 -p0 |
72 |
tmb |
233577 |
#patch7 -p1 |
73 |
kamil |
264251 |
%patch8 -p0 |
74 |
colin |
274043 |
%patch9 -p1 |
75 |
blino |
3384 |
|
76 |
|
|
%build |
77 |
misc |
142547 |
%configure2_5x |
78 |
blino |
3384 |
|
79 |
|
|
%make |
80 |
|
|
|
81 |
|
|
%install |
82 |
|
|
%makeinstall_std |
83 |
|
|
|
84 |
cjw |
119922 |
mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d |
85 |
blino |
3384 |
|
86 |
misc |
142547 |
# FIXME better fix the Makefile directly in the source code |
87 |
cjw |
119922 |
mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros |
88 |
|
|
mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros} |
89 |
blino |
3384 |
|
90 |
tmb |
233483 |
# install rpm-helper.req |
91 |
tmb |
233577 |
#install -m 755 %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/ |
92 |
tmb |
233483 |
|
93 |
blino |
3384 |
%if %have_emacsmodespec |
94 |
|
|
# spec mode for emacs |
95 |
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
96 |
|
|
install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
97 |
|
|
|
98 |
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d |
99 |
|
|
cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el |
100 |
|
|
(setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist)) |
101 |
blino |
3488 |
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t) |
102 |
blino |
3384 |
EOF |
103 |
|
|
%endif |
104 |
|
|
|
105 |
|
|
%check |
106 |
|
|
make test |
107 |
|
|
|
108 |
|
|
%files |
109 |
blino |
25060 |
%dir %{_prefix}/lib/rpm/%{_real_vendor} |
110 |
tmb |
47647 |
%{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
111 |
|
|
%{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt |
112 |
|
|
%{_prefix}/lib/rpm/rpmb_deprecated |
113 |
blino |
3384 |
%dir %{_sysconfdir}/rpm/macros.d |
114 |
|
|
%{_sysconfdir}/rpm/macros.d/20common.macros |
115 |
|
|
|
116 |
|
|
%files build |
117 |
|
|
%doc NEWS ChangeLog |
118 |
|
|
%{_sysconfdir}/rpm/macros.d/20build.macros |
119 |
blino |
25060 |
%{_prefix}/lib/rpm/%{_real_vendor}/* |
120 |
tmb |
47647 |
%exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
121 |
|
|
%exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt |
122 |
|
|
%exclude %{_prefix}/lib/rpm/rpmb_deprecated |
123 |
blino |
3384 |
%if %have_emacsmodespec |
124 |
|
|
%{_datadir}/emacs/site-lisp/rpm-spec-mode.el |
125 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el |
126 |
|
|
%endif |