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 |
tv |
277874 |
Version: 1.155 |
23 |
tv |
278305 |
Release: %mkrel 1 |
24 |
tmb |
47647 |
Source0: %{name}-%{version}.tar.xz |
25 |
tv |
274307 |
# NO PATCH ACCEPTED: WORK in SVN!!!! |
26 |
blino |
3384 |
License: GPLv2+ |
27 |
|
|
Group: System/Configuration/Packaging |
28 |
tmb |
24937 |
Url: http://www.mageia.org/ |
29 |
blino |
3384 |
BuildRequires: rpm-devel |
30 |
tv |
264691 |
%rename rpm-mandriva-setup |
31 |
blino |
3384 |
|
32 |
|
|
%description |
33 |
blino |
3406 |
The %{distribution} rpm configuration and scripts. |
34 |
blino |
3384 |
|
35 |
|
|
%package build |
36 |
|
|
Group: System/Configuration/Packaging |
37 |
blino |
3406 |
Summary: The %{distribution} rpm configuration and scripts to build rpms |
38 |
blino |
3404 |
Requires: spec-helper |
39 |
misc |
142547 |
Requires: multiarch-utils |
40 |
|
|
# needed for script to extract pkgconfig info |
41 |
blino |
3384 |
Requires: pkgconfig |
42 |
|
|
Requires: python-pkg-resources |
43 |
blino |
201807 |
Requires: rpmlint-mageia-policy |
44 |
blino |
3384 |
Requires: %name = %version-%release |
45 |
blino |
3404 |
# for product version macros |
46 |
misc |
142548 |
Requires: %{_real_vendor}-release |
47 |
tv |
264691 |
%rename rpm-mandriva-setup-build |
48 |
tv |
278305 |
Requires: dwz |
49 |
blino |
3384 |
|
50 |
|
|
%description build |
51 |
blino |
3406 |
The %{distribution} rpm configuration and scripts dedicated to build rpms. |
52 |
blino |
3384 |
|
53 |
|
|
%prep |
54 |
|
|
%setup -q |
55 |
|
|
|
56 |
|
|
%build |
57 |
misc |
142547 |
%configure2_5x |
58 |
blino |
3384 |
|
59 |
|
|
%make |
60 |
|
|
|
61 |
|
|
%install |
62 |
|
|
%makeinstall_std |
63 |
|
|
|
64 |
cjw |
119922 |
mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d |
65 |
blino |
3384 |
|
66 |
misc |
142547 |
# FIXME better fix the Makefile directly in the source code |
67 |
cjw |
119922 |
mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros |
68 |
|
|
mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros} |
69 |
blino |
3384 |
|
70 |
|
|
%if %have_emacsmodespec |
71 |
|
|
# spec mode for emacs |
72 |
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
73 |
|
|
install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
74 |
|
|
|
75 |
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d |
76 |
|
|
cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el |
77 |
|
|
(setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist)) |
78 |
blino |
3488 |
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t) |
79 |
blino |
3384 |
EOF |
80 |
|
|
%endif |
81 |
|
|
|
82 |
|
|
%check |
83 |
|
|
make test |
84 |
|
|
|
85 |
|
|
%files |
86 |
blino |
25060 |
%dir %{_prefix}/lib/rpm/%{_real_vendor} |
87 |
tmb |
47647 |
%{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
88 |
blino |
3384 |
%dir %{_sysconfdir}/rpm/macros.d |
89 |
|
|
%{_sysconfdir}/rpm/macros.d/20common.macros |
90 |
|
|
|
91 |
|
|
%files build |
92 |
|
|
%doc NEWS ChangeLog |
93 |
|
|
%{_sysconfdir}/rpm/macros.d/20build.macros |
94 |
tv |
275050 |
%{_sysconfdir}/rpm/macros.d/dwz.macros |
95 |
blino |
25060 |
%{_prefix}/lib/rpm/%{_real_vendor}/* |
96 |
tmb |
47647 |
%exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
97 |
blino |
3384 |
%if %have_emacsmodespec |
98 |
|
|
%{_datadir}/emacs/site-lisp/rpm-spec-mode.el |
99 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el |
100 |
|
|
%endif |