/[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 481787 - (show annotations) (download)
Fri Sep 20 12:23:57 2013 UTC (10 years, 6 months ago) by pterjan
File size: 2922 byte(s)
Support gems with .so under ext and not installed in lib
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.186
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
51 %description build
52 The %{distribution} rpm configuration and scripts dedicated to build rpms.
53
54 %prep
55 %setup -q
56
57 %build
58 %configure2_5x
59
60 %make
61
62 %install
63 %makeinstall_std
64
65 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
66
67 # FIXME better fix the Makefile directly in the source code
68 mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros
69 mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros}
70
71 %if %have_emacsmodespec
72 # spec mode for emacs
73 install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
74 install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
75
76 install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d
77 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el
78 (setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist))
79 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
80 EOF
81 %endif
82
83 %check
84 make test
85
86 %files
87 %dir %{_prefix}/lib/rpm/%{_real_vendor}
88 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
89 %dir %{_sysconfdir}/rpm/macros.d
90 %{_sysconfdir}/rpm/macros.d/20common.macros
91
92 %files build
93 %doc NEWS
94 %{_sysconfdir}/rpm/macros.d/20build.macros
95 %{_sysconfdir}/rpm/macros.d/dwz.macros
96 %{_prefix}/lib/rpm/%{_real_vendor}/*
97 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
98 %if %have_emacsmodespec
99 %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
100 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
101 %endif

  ViewVC Help
Powered by ViewVC 1.1.30