/[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 201807 - (show annotations) (download)
Thu Jan 26 07:56:37 2012 UTC (12 years, 2 months ago) by blino
File size: 3366 byte(s)
require rpmlint-mageia-policy, as discussed on "[Mageia-dev] rpmlint"
thread, and as per suggestion of pterjan

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.147
23 Release: %mkrel 4
24 Source0: %{name}-%{version}.tar.xz
25 # Patch that need a review
26 Patch1: rpm-mageia-setup-1.145-fix-rpm49-build.patch
27 # Patches already in mageia svn
28 Patch2: rpm-mageia-setup-1.147-add-osgi-maven-support.patch
29 Patch3: rpm-mageia-setup-1.147-Use-upstream-desktop-file.prov.patch
30 Patch4: rpm-mageia-setup-1.147-Better-handle-maven-prov.patch
31 License: GPLv2+
32 Group: System/Configuration/Packaging
33 Url: http://www.mageia.org/
34 BuildRequires: rpm-devel
35
36 %description
37 The %{distribution} rpm configuration and scripts.
38
39 %package build
40 Group: System/Configuration/Packaging
41 Summary: The %{distribution} rpm configuration and scripts to build rpms
42 Requires: spec-helper
43 Requires: multiarch-utils
44 # needed for script to extract pkgconfig info
45 Requires: pkgconfig
46 Requires: python-pkg-resources
47 Requires: rpmlint-mageia-policy
48 Requires: %name = %version-%release
49 # for product version macros
50 Requires: %{_real_vendor}-release
51
52 %description build
53 The %{distribution} rpm configuration and scripts dedicated to build rpms.
54
55 %prep
56 %setup -q
57 %patch1 -p0
58 %patch2 -p0
59 %patch3 -p0
60 %patch4 -p0
61
62 %build
63 %configure2_5x
64
65 %make
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 %makeinstall_std
70
71 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
72
73 # FIXME better fix the Makefile directly in the source code
74 mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros
75 mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros}
76
77 %if %have_emacsmodespec
78 # spec mode for emacs
79 install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
80 install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
81
82 install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d
83 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el
84 (setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist))
85 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
86 EOF
87 %endif
88
89 %check
90 make test
91
92 %files
93 %dir %{_prefix}/lib/rpm/%{_real_vendor}
94 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
95 %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
96 %{_prefix}/lib/rpm/rpmb_deprecated
97 %dir %{_sysconfdir}/rpm/macros.d
98 %{_sysconfdir}/rpm/macros.d/20common.macros
99
100 %files build
101 %doc NEWS ChangeLog
102 %{_sysconfdir}/rpm/macros.d/20build.macros
103 %{_prefix}/lib/rpm/%{_real_vendor}/*
104 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
105 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
106 %exclude %{_prefix}/lib/rpm/rpmb_deprecated
107 %if %have_emacsmodespec
108 %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
109 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
110 %endif

  ViewVC Help
Powered by ViewVC 1.1.30