/[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 466683 - (show annotations) (download)
Thu Aug 15 12:32:10 2013 UTC (10 years, 8 months ago) by fwang
File size: 3000 byte(s)
make it compat with rubygems 2.0
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.177
23 Release: %mkrel 1
24 Source0: %{name}-%{version}.tar.xz
25 Source1: gettarball.sh
26 # NO PATCH ACCEPTED: WORK in SVN!!!!
27 License: GPLv2+
28 Group: System/Packaging
29 Url: http://www.mageia.org/
30 BuildRequires: rpm-devel
31 %rename rpm-mandriva-setup
32
33 %description
34 The %{distribution} rpm configuration and scripts.
35
36 %package build
37 Group: System/Packaging
38 Summary: The %{distribution} rpm configuration and scripts to build rpms
39 Requires: spec-helper
40 Requires: multiarch-utils
41 # needed for script to extract pkgconfig info
42 Requires: pkgconfig
43 Requires: python-pkg-resources
44 Requires: rpmlint-mageia-policy
45 Requires: %name = %version-%release
46 # for product version macros
47 Requires: %{_real_vendor}-release
48 %rename rpm-mandriva-setup-build
49 Requires: dwz
50 # gem_helper now do not support rubygems < 2.0
51 Conflicts: ruby-RubyGems < 2.0
52
53 %description build
54 The %{distribution} rpm configuration and scripts dedicated to build rpms.
55
56 %prep
57 %setup -q
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