From ebbf06d1982ad33ebcfb31ed072927c4a500caf8 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 11 Nov 2021 12:33:01 -0500 Subject: [PATCH] Reduce macro indirection in the spec file --- libIDL.spec | 69 ++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/libIDL.spec b/libIDL.spec index 44e1aba..01fc9da 100644 --- a/libIDL.spec +++ b/libIDL.spec @@ -5,10 +5,10 @@ Version: 0.8.14 Release: %autorelease %global minorversion %(echo '%{version}' | cut -d . -f 1-2) -URL: https://download.gnome.org/sources/%{name}/%{minorversion}/ -Source0: %{url}/%{name}-%{version}.tar.bz2 +URL: https://download.gnome.org/sources/libIDL/%{minorversion}/ +Source0: %{url}/libIDL-%{version}.tar.bz2 # Hand-written man page: -Source1: %{name}-config-2.1 +Source1: libIDL-config-2.1 License: LGPLv2+ # 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 # 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. -# contact is available. Any patches below will therefore not be sent upstream, -# because there is nowhere for them to go. +# Any patches below will therefore not be sent upstream, because there is +# nowhere for them to go. # # 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 @@ -26,25 +26,25 @@ License: LGPLv2+ # Fix paths reported by the libIDL-config-2 tool to conform with Fedora # 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, # 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 # 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. # 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 # 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 # 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 # 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 # 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: make @@ -58,14 +58,14 @@ BuildRequires: texinfo-tex BuildRequires: tex(latex) %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.} %description %{common_description} %package devel -Summary: Development libraries and header files for %{name} +Summary: Development libraries and header files for libIDL Requires: %{name} = %{version}-%{release} Requires: pkgconfig Requires: glib2-devel%{?_isa} @@ -73,16 +73,16 @@ Requires: glib2-devel%{?_isa} %description devel %{common_description} This package contains the header files and libraries needed to write or compile -programs that use %{name}. +programs that use libIDL. %package doc -Summary: Documentation for %{name} +Summary: Documentation for libIDL BuildArch: noarch %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 @@ -93,52 +93,45 @@ This page contains info pages and HTML and PDF documentation for %{name}. %configure --disable-static # We re-generate the info page, and also build PDF and HTML docs from the # texinfo source. -rm %{name}2.info -%make_build all %{name}2.info %{name}2.html %{name}2.pdf +rm libIDL2.info +%make_build all libIDL2.info libIDL2.html libIDL2.pdf %install %make_install -rm '%{buildroot}%{_libdir}/%{name}-2.la' +rm '%{buildroot}%{_libdir}/libIDL-2.la' rm '%{buildroot}%{_infodir}/dir' install -t '%{buildroot}%{_pkgdocdir}' -D -p -m 0644 \ - AUTHORS \ - BUGS \ - ChangeLog \ - HACKING \ - 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 + AUTHORS BUGS ChangeLog HACKING MAINTAINERS NEWS README libIDL2.pdf +cp -rp 'libIDL2.html' '%{buildroot}%{_pkgdocdir}/html' +install -t '%{buildroot}%{_datadir}/aclocal/libIDL.m4' -D -p -m 0644 \ + libIDL.m4 install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}' %files %license COPYING -%{_libdir}/%{name}-2.so.%{so_version} -%{_libdir}/%{name}-2.so.%{so_version}.* +%{_libdir}/libIDL-2.so.%{so_version} +%{_libdir}/libIDL-2.so.%{so_version}.* %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 -%{_datadir}/aclocal/%{name}.m4 -%{_bindir}/%{name}-config-2 -%{_mandir}/man1/%{name}-config-2.1* +%{_datadir}/aclocal/libIDL.m4 +%{_bindir}/libIDL-config-2 +%{_mandir}/man1/libIDL-config-2.1* %files doc %license COPYING -%{_infodir}/%{name}2.info* +%{_infodir}/libIDL2.info* %{_pkgdocdir}