/[packages]/cauldron/rpm-mageia-setup/current/SPECS/rpm-mageia-setup.spec
ViewVC logotype

Annotation of /cauldron/rpm-mageia-setup/current/SPECS/rpm-mageia-setup.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 145263 - (hide annotations) (download)
Mon Sep 19 03:23:02 2011 UTC (12 years, 7 months ago) by fwang
File size: 2951 byte(s)
new version 1.144
1 blino 25078 # hardcoded so that build from another distro keeps this name
2     # (mandatory to have correct package name and source name)
3 blino 25060 %define _real_vendor mageia
4 blino 3459
5 blino 3384 %if %{?distsuffix:0}%{?!distsuffix:1}
6 blino 3486 %define distsuffix .mga
7 blino 3384 %endif
8    
9     %if %{?mkrel:0}%{?!mkrel:1}
10 blino 3487 %define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release}%{?subrel:.%subrel}
11 blino 3384 %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 blino 3406 Summary: The %{distribution} rpm configuration and scripts
21 blino 25060 Name: rpm-%{_real_vendor}-setup
22 fwang 145263 Version: 1.144
23 jquelin 62625 Release: %mkrel 1
24 tmb 47647 Source0: %{name}-%{version}.tar.xz
25 blino 3384 License: GPLv2+
26     Group: System/Configuration/Packaging
27 tmb 24937 Url: http://www.mageia.org/
28 blino 3384 BuildRequires: rpm-devel
29    
30     %description
31 blino 3406 The %{distribution} rpm configuration and scripts.
32 blino 3384
33     %package build
34     Group: System/Configuration/Packaging
35 blino 3406 Summary: The %{distribution} rpm configuration and scripts to build rpms
36 blino 3404 Requires: spec-helper
37 misc 142547 Requires: multiarch-utils
38     # needed for script to extract pkgconfig info
39 blino 3384 Requires: pkgconfig
40     Requires: python-pkg-resources
41     Requires: %name = %version-%release
42 blino 3404 # for product version macros
43 misc 142548 Requires: %{_real_vendor}-release
44 blino 3384
45     %description build
46 blino 3406 The %{distribution} rpm configuration and scripts dedicated to build rpms.
47 blino 3384
48     %prep
49     %setup -q
50    
51     %build
52 misc 142547 %configure2_5x
53 blino 3384
54     %make
55    
56     %install
57     rm -rf $RPM_BUILD_ROOT
58     %makeinstall_std
59    
60 cjw 119922 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
61 blino 3384
62 misc 142547 # FIXME better fix the Makefile directly in the source code
63 cjw 119922 mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros
64     mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros}
65 blino 3384
66     %if %have_emacsmodespec
67     # spec mode for emacs
68     install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
69     install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
70    
71     install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d
72     cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el
73     (setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist))
74 blino 3488 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
75 blino 3384 EOF
76     %endif
77    
78     %check
79     make test
80    
81     %files
82 blino 25060 %dir %{_prefix}/lib/rpm/%{_real_vendor}
83 tmb 47647 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
84     %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
85     %{_prefix}/lib/rpm/rpmb_deprecated
86 blino 3384 %dir %{_sysconfdir}/rpm/macros.d
87     %{_sysconfdir}/rpm/macros.d/20common.macros
88    
89     %files build
90     %doc NEWS ChangeLog
91     %{_sysconfdir}/rpm/macros.d/20build.macros
92 blino 25060 %{_prefix}/lib/rpm/%{_real_vendor}/*
93 tmb 47647 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
94     %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
95     %exclude %{_prefix}/lib/rpm/rpmb_deprecated
96 blino 3384 %if %have_emacsmodespec
97     %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
98     %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
99     %endif

  ViewVC Help
Powered by ViewVC 1.1.30