ship RPM macros for packaging plug-ins e.a. (#1063144)
This commit is contained in:
parent
56c96c7c40
commit
40c00b55ac
49
gimp.spec
49
gimp.spec
@ -172,6 +172,7 @@ BuildRequires: libXpm-devel
|
|||||||
BuildRequires: chrpath >= 0.13-5
|
BuildRequires: chrpath >= 0.13-5
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
|
||||||
Requires: babl%{?_isa} >= 0.1.10
|
Requires: babl%{?_isa} >= 0.1.10
|
||||||
Requires: gegl%{?_isa} >= 0.2.0
|
Requires: gegl%{?_isa} >= 0.2.0
|
||||||
@ -241,6 +242,7 @@ Requires: gimp-devel-tools = %{?epoch:%{epoch}:}%{version}-%{release}
|
|||||||
Requires: gtk2-devel
|
Requires: gtk2-devel
|
||||||
Requires: glib2-devel
|
Requires: glib2-devel
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
|
Requires: rpm >= 4.11.0
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The gimp-devel package contains the static libraries and header files
|
The gimp-devel package contains the static libraries and header files
|
||||||
@ -377,9 +379,54 @@ export LDFLAGS='-pie'
|
|||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
# Generate RPM macros from pkg-config data:
|
||||||
|
# %%_gimp_datadir -- toplevel directory for brushes, gradients, scripts, ...
|
||||||
|
# %%_gimp_libdir -- toplevel directory for modules, plug-ins, ...
|
||||||
|
# %%_gimp_sysconfdir -- system-wide runtime configuration
|
||||||
|
# %%_gimp_localedir -- toplevel directory for translation files
|
||||||
|
# %%_gimp_scriptdir -- script-fu scripts directory
|
||||||
|
# %%_gimp_plugindir -- plug-in directory
|
||||||
|
gimp_pc_extract_normalize() {
|
||||||
|
PKG_CONFIG_PATH="$PWD" \
|
||||||
|
pkg-config --variable="$1" gimp-%{lib_api_version} | \
|
||||||
|
sed \
|
||||||
|
-e 's|^%_mandir|%%{_mandir}|' \
|
||||||
|
-e 's|^%_infodir|%%{_infodir}|' \
|
||||||
|
-e 's|^%_includedir|%%{_includedir}|' \
|
||||||
|
-e 's|^%_libdir|%%{_libdir}|' \
|
||||||
|
-e 's|^%_localstatedir|%%{_localstatedir}|' \
|
||||||
|
-e 's|^%_sharedstatedir|%%{_sharedstatedir}|' \
|
||||||
|
-e 's|^%_sysconfdir|%%{_sysconfdir}|' \
|
||||||
|
-e 's|^%_datadir|%%{_datadir}|' \
|
||||||
|
-e 's|^%_libexecdir|%%{_libexecdir}|' \
|
||||||
|
-e 's|^%_sbindir|%%{_sbindir}|' \
|
||||||
|
-e 's|^%_bindir|%%{_bindir}|' \
|
||||||
|
-e 's|^%_exec_prefix|%%{_exec_prefix}|' \
|
||||||
|
-e 's|^%_prefix|%%{_prefix}|'
|
||||||
|
}
|
||||||
|
|
||||||
|
_gimp_datadir="$(gimp_pc_extract_normalize gimpdatadir)"
|
||||||
|
_gimp_libdir="$(gimp_pc_extract_normalize gimplibdir)"
|
||||||
|
_gimp_sysconfdir="$(gimp_pc_extract_normalize gimpsysconfdir)"
|
||||||
|
_gimp_localedir="$(gimp_pc_extract_normalize gimplocaledir)"
|
||||||
|
_gimp_scriptdir="${_gimp_datadir}/scripts"
|
||||||
|
_gimp_plugindir="${_gimp_libdir}/plug-ins"
|
||||||
|
|
||||||
|
cat << EOF > macros.gimp
|
||||||
|
# RPM macros for GIMP
|
||||||
|
|
||||||
|
%%_gimp_datadir ${_gimp_datadir}
|
||||||
|
%%_gimp_libdir ${_gimp_libdir}
|
||||||
|
%%_gimp_sysconfdir ${_gimp_sysconfdir}
|
||||||
|
%%_gimp_localedir ${_gimp_localedir}
|
||||||
|
%%_gimp_scriptdir ${_gimp_scriptdir}
|
||||||
|
%%_gimp_plugindir ${_gimp_plugindir}
|
||||||
|
EOF
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
make DESTDIR=%{buildroot} install
|
make DESTDIR=%{buildroot} install
|
||||||
|
install -D -m0644 macros.gimp %{buildroot}%{_rpmconfigdir}/macros.d/macros.gimp
|
||||||
|
|
||||||
# remove rpaths
|
# remove rpaths
|
||||||
find %buildroot -type f -print0 | xargs -0 -L 20 chrpath --delete --keepgoing 2>/dev/null || :
|
find %buildroot -type f -print0 | xargs -0 -L 20 chrpath --delete --keepgoing 2>/dev/null || :
|
||||||
@ -588,6 +635,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
%{_datadir}/aclocal/*.m4
|
%{_datadir}/aclocal/*.m4
|
||||||
%{_includedir}/gimp-%{lib_api_version}
|
%{_includedir}/gimp-%{lib_api_version}
|
||||||
%{_libdir}/pkgconfig/*
|
%{_libdir}/pkgconfig/*
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.gimp
|
||||||
|
|
||||||
%files devel-tools
|
%files devel-tools
|
||||||
%defattr (-, root, root, 0755)
|
%defattr (-, root, root, 0755)
|
||||||
@ -610,6 +658,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
- remove BRs contained in the minimal build environment
|
- remove BRs contained in the minimal build environment
|
||||||
- group BRs into libraries and tools
|
- group BRs into libraries and tools
|
||||||
- remove various old cruft
|
- remove various old cruft
|
||||||
|
- ship RPM macros for packaging plug-ins e.a. (#1063144)
|
||||||
|
|
||||||
* Wed Dec 04 2013 Nils Philippsen <nils@redhat.com> - 2:2.8.10-4
|
* Wed Dec 04 2013 Nils Philippsen <nils@redhat.com> - 2:2.8.10-4
|
||||||
- avoid buffer overflows in file-xwd plug-in (CVE-2013-1913, CVE-2013-1978)
|
- avoid buffer overflows in file-xwd plug-in (CVE-2013-1913, CVE-2013-1978)
|
||||||
|
Loading…
Reference in New Issue
Block a user