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 |
kamil |
264252 |
Release: %mkrel 9 |
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 |
blino |
3384 |
License: GPLv2+ |
38 |
|
|
Group: System/Configuration/Packaging |
39 |
tmb |
24937 |
Url: http://www.mageia.org/ |
40 |
blino |
3384 |
BuildRequires: rpm-devel |
41 |
|
|
|
42 |
|
|
%description |
43 |
blino |
3406 |
The %{distribution} rpm configuration and scripts. |
44 |
blino |
3384 |
|
45 |
|
|
%package build |
46 |
|
|
Group: System/Configuration/Packaging |
47 |
blino |
3406 |
Summary: The %{distribution} rpm configuration and scripts to build rpms |
48 |
blino |
3404 |
Requires: spec-helper |
49 |
misc |
142547 |
Requires: multiarch-utils |
50 |
|
|
# needed for script to extract pkgconfig info |
51 |
blino |
3384 |
Requires: pkgconfig |
52 |
|
|
Requires: python-pkg-resources |
53 |
blino |
201807 |
Requires: rpmlint-mageia-policy |
54 |
blino |
3384 |
Requires: %name = %version-%release |
55 |
blino |
3404 |
# for product version macros |
56 |
misc |
142548 |
Requires: %{_real_vendor}-release |
57 |
blino |
3384 |
|
58 |
|
|
%description build |
59 |
blino |
3406 |
The %{distribution} rpm configuration and scripts dedicated to build rpms. |
60 |
blino |
3384 |
|
61 |
|
|
%prep |
62 |
|
|
%setup -q |
63 |
dmorgan |
187548 |
%patch1 -p0 |
64 |
dmorgan |
188288 |
%patch2 -p0 |
65 |
|
|
%patch3 -p0 |
66 |
dmorgan |
189248 |
%patch4 -p0 |
67 |
dmorgan |
208317 |
%patch5 -p0 |
68 |
tmb |
209755 |
%patch6 -p0 |
69 |
tmb |
233577 |
#patch7 -p1 |
70 |
kamil |
264251 |
%patch8 -p0 |
71 |
blino |
3384 |
|
72 |
|
|
%build |
73 |
misc |
142547 |
%configure2_5x |
74 |
blino |
3384 |
|
75 |
|
|
%make |
76 |
|
|
|
77 |
|
|
%install |
78 |
|
|
%makeinstall_std |
79 |
|
|
|
80 |
cjw |
119922 |
mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d |
81 |
blino |
3384 |
|
82 |
misc |
142547 |
# FIXME better fix the Makefile directly in the source code |
83 |
cjw |
119922 |
mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros |
84 |
|
|
mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros} |
85 |
blino |
3384 |
|
86 |
tmb |
233483 |
# install rpm-helper.req |
87 |
tmb |
233577 |
#install -m 755 %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/ |
88 |
tmb |
233483 |
|
89 |
blino |
3384 |
%if %have_emacsmodespec |
90 |
|
|
# spec mode for emacs |
91 |
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
92 |
|
|
install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
93 |
|
|
|
94 |
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d |
95 |
|
|
cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el |
96 |
|
|
(setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist)) |
97 |
blino |
3488 |
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t) |
98 |
blino |
3384 |
EOF |
99 |
|
|
%endif |
100 |
|
|
|
101 |
|
|
%check |
102 |
|
|
make test |
103 |
|
|
|
104 |
|
|
%files |
105 |
blino |
25060 |
%dir %{_prefix}/lib/rpm/%{_real_vendor} |
106 |
tmb |
47647 |
%{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
107 |
|
|
%{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt |
108 |
|
|
%{_prefix}/lib/rpm/rpmb_deprecated |
109 |
blino |
3384 |
%dir %{_sysconfdir}/rpm/macros.d |
110 |
|
|
%{_sysconfdir}/rpm/macros.d/20common.macros |
111 |
|
|
|
112 |
|
|
%files build |
113 |
|
|
%doc NEWS ChangeLog |
114 |
|
|
%{_sysconfdir}/rpm/macros.d/20build.macros |
115 |
blino |
25060 |
%{_prefix}/lib/rpm/%{_real_vendor}/* |
116 |
tmb |
47647 |
%exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
117 |
|
|
%exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt |
118 |
|
|
%exclude %{_prefix}/lib/rpm/rpmb_deprecated |
119 |
blino |
3384 |
%if %have_emacsmodespec |
120 |
|
|
%{_datadir}/emacs/site-lisp/rpm-spec-mode.el |
121 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el |
122 |
|
|
%endif |