/[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 1453908 - (show annotations) (download)
Tue Oct 15 20:04:52 2019 UTC (5 years, 7 months ago) by pterjan
File size: 5517 byte(s)
Try harder.
1 # Needed when building new python3 version
2 %bcond_with bootstrap
3
4 # hardcoded so that build from another distro keeps this name
5 # (mandatory to have correct package name and source name)
6 %define _real_vendor mageia
7
8 # fix build (debuginfo package is empty...):
9 %define debug_package %{nil}
10
11 # If dist tag isn't defined, define it
12 %if %{?dist:0}%{?!dist:1}
13 %define dist %{?distsuffix:%distsuffix}%{?!distsuffix:.mga}%{?distro_release:%distro_release}
14 %endif
15
16 # If mkrel isn't defined, define it
17 %if %{?mkrel:0}%{?!mkrel:1}
18 %define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?dist:%dist}%{?subrel:.%subrel}
19 %endif
20
21 # This can be useful for backport, as rpm-4.2
22 # provides the emacs-spec mode
23 %define have_emacsmodespec 1
24
25 %{?_with_emacsspecmode: %define have_emacsmodespec 1}
26 %{?_without_emacsspecmode: %define have_emacsmodespec 0}
27
28 Summary: The %{distribution} rpm configuration and scripts
29 Name: rpm-%{_real_vendor}-setup
30 Version: 2.44
31 Release: %mkrel 1
32 # No patch allowed on SOURCE0
33 # prevent suse script to slow down build:
34 Patch0: gi-find-deps.sh.diff
35 # fix Suse attr matching:
36 Patch1: gobjectintrospection.attr.patch
37 Patch3: gobjectintrospection.attr2.patch
38 Source0: %{name}-%{version}.tar.xz
39 Source1: gettarball.sh
40 #
41 # UPSTREAM TO SYNC:
42 #
43 # gi-find-deps.sh is a rpm helper for Provides and Requires. Script creates typelib()-style Provides/Requires.
44 # (From: https://build.opensuse.org/package/show/openSUSE:Factory/gobject-introspection)
45 Source3: gi-find-deps.sh
46 Source4: gobjectintrospection.attr
47 # kernel modules provides/requires
48 # (From: https://src.fedoraproject.org/rpms/redhat-rpm-config/tree):
49 Source5: kmod.attr
50 Source6: kmod.prov
51 Source7: macros.dwz
52 # Forge handling macros
53 # (From: https://src.fedoraproject.org/rpms/redhat-rpm-config/tree):
54 Source8: forge.lua
55 Source9: macros.forge
56 Source10: common.lua
57 # ldconfig stub macros for compatibility
58 # (From: https://src.fedoraproject.org/rpms/redhat-rpm-config/tree):
59 Source11: macros.ldconfig
60
61 Source102: macros.mono-srpm
62 Source103: macros.valgrind-srpm
63
64 #
65 # END OF UPSTREAM
66 #
67
68 # NO PATCH ACCEPTED: WORK in GIT!!!!
69 License: GPLv2+
70 Group: System/Packaging
71 Url: http://www.mageia.org/
72 BuildRequires: rpm-devel
73 %rename rpm-mandriva-setup
74
75 %description
76 The %{distribution} rpm configuration and scripts.
77
78 %package build
79 Group: System/Packaging
80 Summary: The %{distribution} rpm configuration and scripts to build rpms
81 Requires: spec-helper
82 Requires: multiarch-utils
83 # needed for script to extract pkgconfig info
84 Requires: pkgconfig
85 # rust packaging
86 Requires: rust-srpm-macros
87 Requires: %name = %version-%release
88 Requires: bash >= 4.3-24.2
89 # gi-find-deps uses the enhanced grep variant in order to do
90 # multi-line matching (for pkg.requires(..))
91 Requires: pcre
92 # gi-find-deps makes use of 'file' to identify the types.
93 Requires: file
94 # for product version macros
95 Requires: %{_real_vendor}-release
96 Requires: dwz
97 # to generate cmake() provides
98 Requires: cmake-rpm-macros
99 Requires: ocaml-srpm-macros
100 Requires: go-srpm-macros
101
102 # for gdb-add-index:
103 Requires: gdb-headless
104 %if %{without bootstrap}
105 # for g-ir-dep-tool:
106 Requires: gobject-introspection
107 # python packaging
108 Requires: python3-pkg-resources
109 Requires: rpmlint-mageia-policy
110 %endif
111 Requires: perl-srpm-macros
112 Requires: python-srpm-macros
113 Requires: desktop-file-utils
114
115 Conflicts: %{mklibname -d girepository} < 1.41.91-7
116 Conflicts: cmake < 1:3.4.1-7
117
118 %description build
119 The %{distribution} rpm configuration and scripts dedicated to build rpms.
120
121 %prep
122 %setup -q
123 install -D %{S:3} .
124 install -D %{S:4} .
125
126 %autopatch -p1
127
128 %build
129 %configure2_5x
130
131 %make_build
132
133 %install
134 %make_install
135
136 # upstream deps generators:
137 install -D gi-find-deps.sh %{S:6} -m 0755 %{buildroot}%{_rpmconfigdir}/
138 install -D gobjectintrospection.attr %{S:5} -m 0644 %{buildroot}%{_rpmconfigdir}/fileattrs/
139
140 mkdir -p %{buildroot}%{_sysconfdir}/rpm/macros.d
141 mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
142 install -D %{S:7} %{S:9} %{S:11} %{S:102} %{S:103} -m 0644 %{buildroot}%{_rpmconfigdir}/macros.d/
143
144 mkdir -p %{buildroot}%{_rpmluadir}/fedora/srpm
145 install -D %{S:10} %{buildroot}%{_rpmluadir}/fedora
146 install -D %{S:8} %{buildroot}%{_rpmluadir}/fedora/srpm
147
148 # FIXME better fix the Makefile directly in the source code
149 mv %{buildroot}%{_rpmconfigdir}/macros.d/{build.macros,macros.build}
150 cat %{buildroot}%{_rpmconfigdir}/macros.d/macros.build >> %{buildroot}%{_rpmconfigdir}/%{_real_vendor}/macros
151
152 %if %have_emacsmodespec
153 # spec mode for emacs
154 install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
155 install -m644 rpm-spec-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
156
157 install -d $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d
158 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el
159 (setq auto-mode-alist (cons '("\\\\.spec$" . rpm-spec-mode) auto-mode-alist))
160 (autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode (for %{distribution})." t)
161 EOF
162 %endif
163
164 %check
165 make test
166
167 %files
168 %dir %{_rpmconfigdir}/%{_real_vendor}
169 %{_rpmconfigdir}/%{_real_vendor}/macros
170 %{_rpmconfigdir}/%{_real_vendor}/rpmrc
171 %dir %{_sysconfdir}/rpm/macros.d
172
173 %files build
174 %doc NEWS
175 %{_rpmconfigdir}/%{_real_vendor}/*
176 %{_rpmconfigdir}/gi-find-deps.sh
177 %{_rpmconfigdir}/macros.d/*
178 %{_rpmconfigdir}/*.prov
179 %{_rpmluadir}/fedora/
180 %attr(0755,root,root) %{_rpmconfigdir}/redhat/*
181 %exclude %{_rpmconfigdir}/%{_real_vendor}/rpmrc
182 %if %have_emacsmodespec
183 %{_datadir}/emacs/site-lisp/rpm-spec-mode.el
184 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
185 %endif
186 %{_rpmconfigdir}/fileattrs/*.attr

  ViewVC Help
Powered by ViewVC 1.1.30