From c25ec28ca03d3dfbd15e7aa2dae0a80f4a805283 Mon Sep 17 00:00:00 2001 From: DengXiewei Date: Sat, 15 Apr 2023 15:34:37 +0800 Subject: [PATCH] optimise spec Signed-off-by: DengXiewei --- libtasn1.spec | 97 ++++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/libtasn1.spec b/libtasn1.spec index 2dabbc3..25df9ce 100644 --- a/libtasn1.spec +++ b/libtasn1.spec @@ -1,51 +1,47 @@ -%define anolis_release 1 - -Summary: The ASN.1 library used in GNUTLS -Name: libtasn1 -Version: 4.19.0 -Release: %{anolis_release}%{?dist} - -# The libtasn1 library is LGPLv2+, utilities are GPLv3+ -License: GPLv3+ and LGPLv2+ -URL: http://www.gnu.org/software/libtasn1/ -Source0: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz -Source1: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz.sig -Source2: gpgkey-B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE.gpg - -BuildRequires: gnupg2 -BuildRequires: gcc -BuildRequires: bison, pkgconfig, help2man -BuildRequires: autoconf, automake, libtool -BuildRequires: valgrind-devel -BuildRequires: make -BuildRequires: gtk-doc - -Provides: bundled(gnulib) = 20130324 +%define anolis_release 2 -%package devel -Summary: Files for development of applications which will use libtasn1 -Requires: %{name} = %{version}-%{release} -Requires: %{name}-tools = %{version}-%{release} +Summary: The ASN.1 library used in GNUTLS +Name: libtasn1 +Version: 4.19.0 +Release: %{anolis_release}%{?dist} +License: GPLv3+ and LGPLv2+ +URL: http://www.gnu.org/software/libtasn1/ +Source0: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz +Source1: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz.sig +Source2: gpgkey-B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE.gpg -%package tools -Summary: Some ASN.1 tools -License: GPLv3+ -Requires: %{name} = %{version}-%{release} +BuildRequires: gcc, make, gnupg2, bison, pkgconfig, help2man +BuildRequires: autoconf, automake, libtool, gtk-doc, findutils +BuildRequires: valgrind-devel +Provides: bundled(gnulib) = 20130324 %description -A library that provides Abstract Syntax Notation One (ASN.1, as specified -by the X.680 ITU-T recommendation) parsing and structures management, and -Distinguished Encoding Rules (DER, as per X.690) encoding and decoding functions. +Libtasn1 is the ASN.1 library used by GnuTLS, p11-kit and some other packages. +It was originally written by Fabio Fiorina, and now maintained as a GNU package. + +%package devel +Summary: Files for development of applications which will use libtasn1 +Requires: %{name} = %{version}-%{release} +Requires: %{name}-tools = %{version}-%{release} +Requires: pkgconfig %description devel -This package contains files for development of applications which will -use libtasn1. +Libtasn1 is the ASN.1 library used by GnuTLS, p11-kit and some other packages. +It was originally written by Fabio Fiorina, and now maintained as a GNU package. +This package contains development libraries and header files for using libtasn1. + +%package tools +Summary: Tools for ASN.1 +License: GPLv3+ +Requires: %{name} = %{version}-%{release} %description tools -This package contains simple tools that can decode and encode ASN.1 -data. +Libtasn1 is the ASN.1 library used by GnuTLS, p11-kit and some other packages. +It was originally written by Fabio Fiorina, and now maintained as a GNU package. + +This package contains simple tools that can decode and encode ASN.1 data. %package doc Summary: Documentation files for %{name} @@ -53,23 +49,25 @@ Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc -The %{name}-doc package contains documentation files for %{name}. +This package contains documentation files for %{name}. %prep gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} -%setup -q +%autosetup %build -autoreconf -v -f --install -%configure --disable-static --disable-silent-rules -# libtasn1 likes to regenerate docs -touch doc/stamp_docs - +autoreconf -vfi +%configure \ + --disable-static \ + --disable-silent-rules %make_build %install %make_install +# Remove "*.la" files +find %{buildroot}%{_libdir} -name "*.la" -exec %__rm -vf {} \; + %check make check @@ -77,9 +75,6 @@ make check %license COPYING doc/COPYING* %{_libdir}/*.so.6* -%files doc -%doc AUTHORS NEWS README.md - %files tools %{_bindir}/asn1* %{_mandir}/man1/asn1* @@ -91,7 +86,13 @@ make check %{_infodir}/*.info.* %{_mandir}/man3/*asn1* +%files doc +%doc AUTHORS NEWS README.md + %changelog +* Sat Apr 15 2023 DengXiewei - 4.19.0-2 +- optimise spec + * Tue Oct 11 2022 Funda Wang - 4.19.0-1 - New verison 4.19.0 -- Gitee