/[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 274530 - (show annotations) (download)
Thu Jul 26 11:00:26 2012 UTC (11 years, 8 months ago) by tv
File size: 3229 byte(s)
- build with -fPIC on x86_64 too (pok, mdv)
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.150
23 Release: %mkrel 1
24 Source0: %{name}-%{version}.tar.xz
25 #Source1: rpm-helper.req
26 # NO PATCH ACCEPTED: WORK in SVN!!!!
27 License: GPLv2+
28 Group: System/Configuration/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/Configuration/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
50 %description build
51 The %{distribution} rpm configuration and scripts dedicated to build rpms.
52
53 %prep
54 %setup -q
55
56 %build
57 %configure2_5x
58
59 %make
60
61 %install
62 %makeinstall_std
63
64 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
65
66 # FIXME better fix the Makefile directly in the source code
67 mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros
68 mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros}
69
70 # install rpm-helper.req
71 #install -m 755 %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/
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 %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
92 %{_prefix}/lib/rpm/rpmb_deprecated
93 %{_libdir}/rpm-mageia-setup/g-ir-extract-deps
94 %dir %{_sysconfdir}/rpm/macros.d
95 %{_sysconfdir}/rpm/macros.d/20common.macros
96
97 %files build
98 %doc NEWS ChangeLog
99 %{_sysconfdir}/rpm/macros.d/20build.macros
100 %{_prefix}/lib/rpm/%{_real_vendor}/*
101 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
102 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
103 %exclude %{_prefix}/lib/rpm/rpmb_deprecated
104 %if %have_emacsmodespec
105 %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
106 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
107 %endif

  ViewVC Help
Powered by ViewVC 1.1.30