/[packages]/cauldron/rpm-mageia-setup/current/SPECS/rpm-mageia-setup.spec
ViewVC logotype

Contents of /cauldron/rpm-mageia-setup/current/SPECS/rpm-mageia-setup.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 497606 - (show annotations) (download)
Mon Oct 14 20:55:05 2013 UTC (10 years, 6 months ago) by pterjan
File size: 2992 byte(s)
Generate different provides for python2 and python3
1 # hardcoded so that build from another distro keeps this name
2 # (mandatory to have correct package name and source name)
3 %define _real_vendor mageia
4
5 %if %{?distsuffix:0}%{?!distsuffix:1}
6 %define distsuffix .mga
7 %endif
8
9 %if %{?mkrel:0}%{?!mkrel:1}
10 %define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release}%{?subrel:.%subrel}
11 %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 Summary: The %{distribution} rpm configuration and scripts
21 Name: rpm-%{_real_vendor}-setup
22 Version: 1.191
23 Release: %mkrel 1
24 Source0: %{name}-%{version}.tar.xz
25 Source1: gettarball.sh
26 # NO PATCH ACCEPTED: WORK in GIT!!!!
27 Patch0: rpm-mageia-setup-1.190-fix-osgi.patch
28 License: GPLv2+
29 Group: System/Packaging
30 Url: http://www.mageia.org/
31 BuildRequires: rpm-devel
32 %rename rpm-mandriva-setup
33
34 %description
35 The %{distribution} rpm configuration and scripts.
36
37 %package build
38 Group: System/Packaging
39 Summary: The %{distribution} rpm configuration and scripts to build rpms
40 Requires: spec-helper
41 Requires: multiarch-utils
42 # needed for script to extract pkgconfig info
43 Requires: pkgconfig
44 Requires: python-pkg-resources
45 Requires: rpmlint-mageia-policy
46 Requires: %name = %version-%release
47 # for product version macros
48 Requires: %{_real_vendor}-release
49 %rename rpm-mandriva-setup-build
50 Requires: dwz
51
52 %description build
53 The %{distribution} rpm configuration and scripts dedicated to build rpms.
54
55 %prep
56 %setup -q
57 %apply_patches
58
59 %build
60 %configure2_5x
61
62 %make
63
64 %install
65 %makeinstall_std
66
67 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
68
69 # FIXME better fix the Makefile directly in the source code
70 mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros
71 mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros}
72
73 %if %have_emacsmodespec
74 # spec mode for emacs
75 install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
76 install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
77
78 install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d
79 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el
80 (setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist))
81 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
82 EOF
83 %endif
84
85 %check
86 make test
87
88 %files
89 %dir %{_prefix}/lib/rpm/%{_real_vendor}
90 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
91 %dir %{_sysconfdir}/rpm/macros.d
92 %{_sysconfdir}/rpm/macros.d/20common.macros
93
94 %files build
95 %doc NEWS
96 %{_sysconfdir}/rpm/macros.d/20build.macros
97 %{_sysconfdir}/rpm/macros.d/dwz.macros
98 %{_prefix}/lib/rpm/%{_real_vendor}/*
99 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
100 %if %have_emacsmodespec
101 %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
102 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
103 %endif

  ViewVC Help
Powered by ViewVC 1.1.30