/[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 264365 - (show annotations) (download)
Wed Jun 27 08:57:45 2012 UTC (11 years, 9 months ago) by dmorgan
File size: 3795 byte(s)
Fix use of maven and osgi prov script
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 10
24 Source0: %{name}-%{version}.tar.xz
25 #Source1: rpm-helper.req
26 # Patch that need a review
27 Patch1: rpm-mageia-setup-1.145-fix-rpm49-build.patch
28 # 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 Patch4: rpm-mageia-setup-1.147-Better-handle-maven-prov.patch
32 Patch5: rpm-mageia-setup-1.147-Better-handle-osgi-prov.patch
33 Patch6: rpm-mageia-setup-1.147-kmod.prov-handle-xz.patch
34 #Patch7: rpm-mageia-setup-1.147-systemd-require-versioned-rpm-helper.patch
35 # Patch not reviewed
36 Patch8: %{name}-1.147-fix-rename-macro.patch
37 License: GPLv2+
38 Group: System/Configuration/Packaging
39 Url: http://www.mageia.org/
40 BuildRequires: rpm-devel
41
42 %description
43 The %{distribution} rpm configuration and scripts.
44
45 %package build
46 Group: System/Configuration/Packaging
47 Summary: The %{distribution} rpm configuration and scripts to build rpms
48 Requires: spec-helper
49 Requires: multiarch-utils
50 # needed for script to extract pkgconfig info
51 Requires: pkgconfig
52 Requires: python-pkg-resources
53 Requires: rpmlint-mageia-policy
54 Requires: %name = %version-%release
55 # for product version macros
56 Requires: %{_real_vendor}-release
57
58 %description build
59 The %{distribution} rpm configuration and scripts dedicated to build rpms.
60
61 %prep
62 %setup -q
63 %patch1 -p0
64 %patch2 -p0
65 %patch3 -p0
66 %patch4 -p0
67 %patch5 -p0
68 %patch6 -p0
69 #patch7 -p1
70 %patch8 -p0
71
72 %build
73 %configure2_5x
74
75 %make
76
77 %install
78 %makeinstall_std
79
80 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
81
82 # FIXME better fix the Makefile directly in the source code
83 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
86 # install rpm-helper.req
87 #install -m 755 %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/
88
89 %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 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
98 EOF
99 %endif
100
101 %check
102 make test
103
104 %files
105 %dir %{_prefix}/lib/rpm/%{_real_vendor}
106 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
107 %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
108 %{_prefix}/lib/rpm/rpmb_deprecated
109 %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 %{_prefix}/lib/rpm/%{_real_vendor}/*
116 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
117 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
118 %exclude %{_prefix}/lib/rpm/rpmb_deprecated
119 %if %have_emacsmodespec
120 %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
121 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
122 %endif

  ViewVC Help
Powered by ViewVC 1.1.30