/[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 187114 - (show annotations) (download)
Sat Dec 24 01:04:15 2011 UTC (12 years, 3 months ago) by dmorgan
File size: 3026 byte(s)
Revert to  version 1.145
Add patch enabling dep generator
SILENT: All is commited in soft but i can't pass to create a new tarball

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.145
23 Release: %mkrel 1
24 Source0: %{name}-%{version}.tar.xz
25 Patch0: rpm-mageia-setup-1.145-use-dep-generator.patch
26 License: GPLv2+
27 Group: System/Configuration/Packaging
28 Url: http://www.mageia.org/
29 BuildRequires: rpm-devel
30
31 %description
32 The %{distribution} rpm configuration and scripts.
33
34 %package build
35 Group: System/Configuration/Packaging
36 Summary: The %{distribution} rpm configuration and scripts to build rpms
37 Requires: spec-helper
38 Requires: multiarch-utils
39 # needed for script to extract pkgconfig info
40 Requires: pkgconfig
41 Requires: python-pkg-resources
42 Requires: %name = %version-%release
43 # for product version macros
44 Requires: %{_real_vendor}-release
45
46 %description build
47 The %{distribution} rpm configuration and scripts dedicated to build rpms.
48
49 %prep
50 %setup -q
51 %patch0 -p0
52
53 %build
54 %configure2_5x
55
56 %make
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 %makeinstall_std
61
62 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
63
64 # FIXME better fix the Makefile directly in the source code
65 mv %{buildroot}%{_prefix}/lib/rpm/%{_real_vendor}/macros %{buildroot}%{_sysconfdir}/rpm/macros.d/20common.macros
66 mv %{buildroot}%{_sysconfdir}/rpm/macros.d/{build.macros,20build.macros}
67
68 %if %have_emacsmodespec
69 # spec mode for emacs
70 install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
71 install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
72
73 install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d
74 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el
75 (setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist))
76 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
77 EOF
78 %endif
79
80 %check
81 make test
82
83 %files
84 %dir %{_prefix}/lib/rpm/%{_real_vendor}
85 %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
86 %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
87 %{_prefix}/lib/rpm/rpmb_deprecated
88 %dir %{_sysconfdir}/rpm/macros.d
89 %{_sysconfdir}/rpm/macros.d/20common.macros
90
91 %files build
92 %doc NEWS ChangeLog
93 %{_sysconfdir}/rpm/macros.d/20build.macros
94 %{_prefix}/lib/rpm/%{_real_vendor}/*
95 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmrc
96 %exclude %{_prefix}/lib/rpm/%{_real_vendor}/rpmpopt
97 %exclude %{_prefix}/lib/rpm/rpmb_deprecated
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