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 |
|
|
Release: %mkrel 0.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 |
blino |
3384 |
|
49 |
|
|
%description build |
50 |
blino |
3406 |
The %{distribution} rpm configuration and scripts dedicated to build rpms. |
51 |
blino |
3384 |
|
52 |
|
|
%prep |
53 |
|
|
%setup -q |
54 |
|
|
|
55 |
|
|
%build |
56 |
misc |
142547 |
%configure2_5x |
57 |
blino |
3384 |
|
58 |
|
|
%make |
59 |
|
|
|
60 |
|
|
%install |
61 |
|
|
%makeinstall_std |
62 |
|
|
|
63 |
cjw |
119922 |
mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d |
64 |
blino |
3384 |
|
65 |
misc |
142547 |
# FIXME better fix the Makefile directly in the source code |
66 |
cjw |
119922 |
mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros |
67 |
|
|
mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros} |
68 |
blino |
3384 |
|
69 |
|
|
%if %have_emacsmodespec |
70 |
|
|
# spec mode for emacs |
71 |
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
72 |
|
|
install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ |
73 |
|
|
|
74 |
|
|
install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d |
75 |
|
|
cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el |
76 |
|
|
(setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist)) |
77 |
blino |
3488 |
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t) |
78 |
blino |
3384 |
EOF |
79 |
|
|
%endif |
80 |
|
|
|
81 |
|
|
%check |
82 |
|
|
make test |
83 |
|
|
|
84 |
|
|
%files |
85 |
blino |
25060 |
%dir %{_prefix}/lib/rpm/%{_real_vendor} |
86 |
tmb |
47647 |
%{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
87 |
blino |
3384 |
%dir %{_sysconfdir}/rpm/macros.d |
88 |
|
|
%{_sysconfdir}/rpm/macros.d/20common.macros |
89 |
|
|
|
90 |
|
|
%files build |
91 |
|
|
%doc NEWS ChangeLog |
92 |
|
|
%{_sysconfdir}/rpm/macros.d/20build.macros |
93 |
tv |
275050 |
%{_sysconfdir}/rpm/macros.d/dwz.macros |
94 |
blino |
25060 |
%{_prefix}/lib/rpm/%{_real_vendor}/* |
95 |
tmb |
47647 |
%exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc |
96 |
blino |
3384 |
%if %have_emacsmodespec |
97 |
|
|
%{_datadir}/emacs/site-lisp/rpm-spec-mode.el |
98 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el |
99 |
|
|
%endif |