Reduce macro indirection in the spec file

i9ce
Benjamin A. Beasley 3 years ago
parent 279a018cf4
commit ebbf06d198

@ -5,10 +5,10 @@ Version: 0.8.14
Release: %autorelease Release: %autorelease
%global minorversion %(echo '%{version}' | cut -d . -f 1-2) %global minorversion %(echo '%{version}' | cut -d . -f 1-2)
URL: https://download.gnome.org/sources/%{name}/%{minorversion}/ URL: https://download.gnome.org/sources/libIDL/%{minorversion}/
Source0: %{url}/%{name}-%{version}.tar.bz2 Source0: %{url}/libIDL-%{version}.tar.bz2
# Hand-written man page: # Hand-written man page:
Source1: %{name}-config-2.1 Source1: libIDL-config-2.1
License: LGPLv2+ License: LGPLv2+
# Note that upstream is dead; GNOME still offers just a download page, and the # Note that upstream is dead; GNOME still offers just a download page, and the
@ -16,8 +16,8 @@ License: LGPLv2+
# is archived and therefore no bug tracker is offered. An old email address for # is archived and therefore no bug tracker is offered. An old email address for
# the ORBIT development mailing list is offered in the HACKING file, but the # the ORBIT development mailing list is offered in the HACKING file, but the
# archived status of the project shows that nothing will be done with patches. # archived status of the project shows that nothing will be done with patches.
# contact is available. Any patches below will therefore not be sent upstream, # Any patches below will therefore not be sent upstream, because there is
# because there is nowhere for them to go. # nowhere for them to go.
# #
# Normally this would be the time to re-evaluate whether the package still # Normally this would be the time to re-evaluate whether the package still
# belongs in Fedora, but ORBit2 still requires it, and at least libgnome and # belongs in Fedora, but ORBit2 still requires it, and at least libgnome and
@ -26,25 +26,25 @@ License: LGPLv2+
# Fix paths reported by the libIDL-config-2 tool to conform with Fedora # Fix paths reported by the libIDL-config-2 tool to conform with Fedora
# multilib installation paths: # multilib installation paths:
Patch0: %{name}-0.8.6-multilib.patch Patch0: libIDL-0.8.6-multilib.patch
# Remove an unused parent-node variable in the primary_expr part of the parser, # Remove an unused parent-node variable in the primary_expr part of the parser,
# which caused a compiler warning. # which caused a compiler warning.
Patch1: %{name}-0.8.14-parser-primary_expr-unused-parent-node.patch Patch1: libIDL-0.8.14-parser-primary_expr-unused-parent-node.patch
# On platforms (such as 64-bit Linux), where long long int and long int are # On platforms (such as 64-bit Linux), where long long int and long int are
# both 64-bit, we can have IDL_LL defined to ll (format with %%lld) while # both 64-bit, we can have IDL_LL defined to ll (format with %%lld) while
# IDL_longlong_t, which is just gint64, may be ultimately defined to long int. # IDL_longlong_t, which is just gint64, may be ultimately defined to long int.
# This results in compiler warnings about the mismatch between the long long # This results in compiler warnings about the mismatch between the long long
# format and long parameter, even though the types are compatible. We can fix # format and long parameter, even though the types are compatible. We can fix
# this with a cast to (long long) before formatting. # this with a cast to (long long) before formatting.
Patch2: %{name}-0.8.14-long-long-format-warnings.patch Patch2: libIDL-0.8.14-long-long-format-warnings.patch
# Instead of type-punning with sscanf, parse into a temporary with a type # Instead of type-punning with sscanf, parse into a temporary with a type
# matching the format code and then memmove into the “integer” storage. This is # matching the format code and then memmove into the “integer” storage. This is
# no less platform-dependent, but does not invoke undefined behavior or produce # no less platform-dependent, but does not invoke undefined behavior or produce
# a compiler warning. # a compiler warning.
Patch3: %{name}-0.8.14-lexer-sscanf-type-punning.patch Patch3: libIDL-0.8.14-lexer-sscanf-type-punning.patch
# Fix references to the old libIDL-config script by changing them to # Fix references to the old libIDL-config script by changing them to
# libIDL-config-2. # libIDL-config-2.
Patch4: %{name}-0.8.14-old-libIDL-config-script.patch Patch4: libIDL-0.8.14-old-libIDL-config-script.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: make BuildRequires: make
@ -58,14 +58,14 @@ BuildRequires: texinfo-tex
BuildRequires: tex(latex) BuildRequires: tex(latex)
%global common_description %{expand: %global common_description %{expand:
%{name} is a library for parsing IDL (Interface Definition Language). It can be libIDL is a library for parsing IDL (Interface Definition Language). It can be
used for both COM-style and CORBA-style IDL.} used for both COM-style and CORBA-style IDL.}
%description %{common_description} %description %{common_description}
%package devel %package devel
Summary: Development libraries and header files for %{name} Summary: Development libraries and header files for libIDL
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
Requires: glib2-devel%{?_isa} Requires: glib2-devel%{?_isa}
@ -73,16 +73,16 @@ Requires: glib2-devel%{?_isa}
%description devel %{common_description} %description devel %{common_description}
This package contains the header files and libraries needed to write or compile This package contains the header files and libraries needed to write or compile
programs that use %{name}. programs that use libIDL.
%package doc %package doc
Summary: Documentation for %{name} Summary: Documentation for libIDL
BuildArch: noarch BuildArch: noarch
%description doc %{common_description} %description doc %{common_description}
This page contains info pages and HTML and PDF documentation for %{name}. This page contains info pages and HTML and PDF documentation for libIDL.
%prep %prep
@ -93,52 +93,45 @@ This page contains info pages and HTML and PDF documentation for %{name}.
%configure --disable-static %configure --disable-static
# We re-generate the info page, and also build PDF and HTML docs from the # We re-generate the info page, and also build PDF and HTML docs from the
# texinfo source. # texinfo source.
rm %{name}2.info rm libIDL2.info
%make_build all %{name}2.info %{name}2.html %{name}2.pdf %make_build all libIDL2.info libIDL2.html libIDL2.pdf
%install %install
%make_install %make_install
rm '%{buildroot}%{_libdir}/%{name}-2.la' rm '%{buildroot}%{_libdir}/libIDL-2.la'
rm '%{buildroot}%{_infodir}/dir' rm '%{buildroot}%{_infodir}/dir'
install -t '%{buildroot}%{_pkgdocdir}' -D -p -m 0644 \ install -t '%{buildroot}%{_pkgdocdir}' -D -p -m 0644 \
AUTHORS \ AUTHORS BUGS ChangeLog HACKING MAINTAINERS NEWS README libIDL2.pdf
BUGS \ cp -rp 'libIDL2.html' '%{buildroot}%{_pkgdocdir}/html'
ChangeLog \ install -t '%{buildroot}%{_datadir}/aclocal/libIDL.m4' -D -p -m 0644 \
HACKING \ libIDL.m4
MAINTAINERS \
NEWS \
README \
%{name}2.pdf
cp -rp '%{name}2.html' '%{buildroot}%{_pkgdocdir}/html'
install -t '%{buildroot}%{_datadir}/aclocal/%{name}.m4' -D -p -m 0644 \
%{name}.m4
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}' install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'
%files %files
%license COPYING %license COPYING
%{_libdir}/%{name}-2.so.%{so_version} %{_libdir}/libIDL-2.so.%{so_version}
%{_libdir}/%{name}-2.so.%{so_version}.* %{_libdir}/libIDL-2.so.%{so_version}.*
%files devel %files devel
%{_libdir}/%{name}-2.so %{_libdir}/libIDL-2.so
%{_includedir}/%{name}-2.0/ %{_includedir}/libIDL-2.0/
%{_libdir}/pkgconfig/%{name}-2.0.pc %{_libdir}/pkgconfig/libIDL-2.0.pc
# Note the aclocal directory is provided by the “filesystem” package # Note the aclocal directory is provided by the “filesystem” package
%{_datadir}/aclocal/%{name}.m4 %{_datadir}/aclocal/libIDL.m4
%{_bindir}/%{name}-config-2 %{_bindir}/libIDL-config-2
%{_mandir}/man1/%{name}-config-2.1* %{_mandir}/man1/libIDL-config-2.1*
%files doc %files doc
%license COPYING %license COPYING
%{_infodir}/%{name}2.info* %{_infodir}/libIDL2.info*
%{_pkgdocdir} %{_pkgdocdir}

Loading…
Cancel
Save