/[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 145263 - (show 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 # 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.144
23 Release: %mkrel 1
24 Source0: %{name}-%{version}.tar.xz
25 License: GPLv2+
26 Group: System/Configuration/Packaging
27 Url: http://www.mageia.org/
28 BuildRequires: rpm-devel
29
30 %description
31 The %{distribution} rpm configuration and scripts.
32
33 %package build
34 Group: System/Configuration/Packaging
35 Summary: The %{distribution} rpm configuration and scripts to build rpms
36 Requires: spec-helper
37 Requires: multiarch-utils
38 # needed for script to extract pkgconfig info
39 Requires: pkgconfig
40 Requires: python-pkg-resources
41 Requires: %name = %version-%release
42 # for product version macros
43 Requires: %{_real_vendor}-release
44
45 %description build
46 The %{distribution} rpm configuration and scripts dedicated to build rpms.
47
48 %prep
49 %setup -q
50
51 %build
52 %configure2_5x
53
54 %make
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 %makeinstall_std
59
60 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
61
62 # FIXME better fix the Makefile directly in the source code
63 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
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 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
75 EOF
76 %endif
77
78 %check
79 make test
80
81 %files
82 %dir %{_prefix}/lib/rpm/%{_real_vendor}
83 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
84 %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
85 %{_prefix}/lib/rpm/rpmb_deprecated
86 %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 %{_prefix}/lib/rpm/%{_real_vendor}/*
93 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
94 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
95 %exclude %{_prefix}/lib/rpm/rpmb_deprecated
96 %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