From 424132003433e8587d1919e94860ae3247a7df41 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 14 May 2020 11:38:03 +0200 Subject: contrib: integrate RPM spec Remove OpenSUSE bug report link, set version to @VERSION@, make it build with CentOS 8 etc. Related: OS#4550 Change-Id: Ic075dd5a53cc76cf1b6aeca5c31db495882db915 --- .gitignore | 2 + configure.ac | 3 +- contrib/libasn1c.spec | 98 ------------------------------------------------ contrib/libasn1c.spec.in | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 99 deletions(-) delete mode 100644 contrib/libasn1c.spec create mode 100644 contrib/libasn1c.spec.in diff --git a/.gitignore b/.gitignore index 4a42306..2852b4d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ libasn1c.pc *.la .deps .libs + +contrib/libasn1c.spec diff --git a/configure.ac b/configure.ac index 53720b9..8c93c3f 100644 --- a/configure.ac +++ b/configure.ac @@ -75,4 +75,5 @@ AC_OUTPUT( src/Makefile include/Makefile include/asn1c/Makefile - Makefile) + Makefile + contrib/libasn1c.spec) diff --git a/contrib/libasn1c.spec b/contrib/libasn1c.spec deleted file mode 100644 index e05b3e9..0000000 --- a/contrib/libasn1c.spec +++ /dev/null @@ -1,98 +0,0 @@ -# -# spec file for package libasn1c -# -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - -Name: libasn1c -Version: 0.9.32.0 -Release: 0 -Summary: Osmocon ASN.1 decoder and encoder library -License: BSD-2-Clause -Group: Development/Libraries/C and C++ -Url: http://openbsc.osmocom.org/trac/ - -Source: %name-%version.tar.xz -BuildRequires: libtool >= 2 -BuildRequires: pkg-config -BuildRequires: xz -BuildRequires: pkgconfig(libosmocore) >= 0.1.13 -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%description -Lev Walkins's asn1c runtime, as a shared library and with -modifications for Osmocom. - -Compiles ASN.1 data structures into C source structures that can be -simply (un)marshalled from and to: BER, DER, CER, BASIC-XER, CXER, -EXTENDED-XER, PER. - -%package -n libasn1c1 -Summary: Osmocon ASN.1 decoder and encoder library -Group: System/Libraries - -%description -n libasn1c1 -Lev Walkins's asn1c runtime, as a shared library and with -modifications for Osmocom. - -Compiles ASN.1 data structures into C source structures that can be -simply (un)marshalled from and to: BER, DER, CER, BASIC-XER, CXER, -EXTENDED-XER, PER. - -%package -n libasn1c-devel -Summary: Development files for libasn1c, Osmocom's ASN.1 decoder and encoder library -Group: Development/Libraries/C and C++ -Requires: libasn1c1 = %version -Requires: libtalloc-devel - -%description -n libasn1c-devel -Compiles ASN.1 data structures into C source structures that can be -simply (un)marshalled from and to: BER, DER, CER, BASIC-XER, CXER, -EXTENDED-XER, PER. - -This subpackage contains libraries and header files for developing -applications that want to make use of libasn1c. - -%prep -%setup -q - -%build -echo "%{version}" >.tarball-version -autoreconf -fi -%configure --disable-static -make %{?_smp_mflags} - -%install -%make_install -find "%buildroot/%_libdir" -type f -name "*.la" -delete - -%check -make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) - -%post -n libasn1c1 -p /sbin/ldconfig -%postun -n libasn1c1 -p /sbin/ldconfig - -%files -n libasn1c1 -%defattr(-,root,root) -%_libdir/libasn1c.so.1* - -%files -n libasn1c-devel -%defattr(-,root,root) -%doc COPYING -%_includedir/asn1c/ -%_libdir/pkgconfig/*.pc -%_libdir/libasn1c.so - -%changelog diff --git a/contrib/libasn1c.spec.in b/contrib/libasn1c.spec.in new file mode 100644 index 0000000..59098c3 --- /dev/null +++ b/contrib/libasn1c.spec.in @@ -0,0 +1,94 @@ +# +# spec file for package libasn1c +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +Name: libasn1c +Version: @VERSION@ +Release: 0 +Summary: Osmocon ASN.1 decoder and encoder library +License: BSD-2-Clause +Group: Development/Libraries/C and C++ +Url: http://openbsc.osmocom.org/trac/ + +Source: %name-%version.tar.xz +BuildRequires: libtool >= 2 +BuildRequires: pkg-config +BuildRequires: xz +BuildRequires: pkgconfig(libosmocore) >= 0.1.13 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Lev Walkins's asn1c runtime, as a shared library and with +modifications for Osmocom. + +Compiles ASN.1 data structures into C source structures that can be +simply (un)marshalled from and to: BER, DER, CER, BASIC-XER, CXER, +EXTENDED-XER, PER. + +%package -n libasn1c1 +Summary: Osmocon ASN.1 decoder and encoder library +Group: System/Libraries + +%description -n libasn1c1 +Lev Walkins's asn1c runtime, as a shared library and with +modifications for Osmocom. + +Compiles ASN.1 data structures into C source structures that can be +simply (un)marshalled from and to: BER, DER, CER, BASIC-XER, CXER, +EXTENDED-XER, PER. + +%package -n libasn1c-devel +Summary: Development files for libasn1c, Osmocom's ASN.1 decoder and encoder library +Group: Development/Libraries/C and C++ +Requires: libasn1c1 = %version +Requires: libtalloc-devel + +%description -n libasn1c-devel +Compiles ASN.1 data structures into C source structures that can be +simply (un)marshalled from and to: BER, DER, CER, BASIC-XER, CXER, +EXTENDED-XER, PER. + +This subpackage contains libraries and header files for developing +applications that want to make use of libasn1c. + +%prep +%setup -q + +%build +echo "%{version}" >.tarball-version +autoreconf -fi +%configure --disable-static +make %{?_smp_mflags} + +%install +%make_install +find "%buildroot/%_libdir" -type f -name "*.la" -delete + +%check +make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) + +%post -n libasn1c1 -p /sbin/ldconfig +%postun -n libasn1c1 -p /sbin/ldconfig + +%files -n libasn1c1 +%defattr(-,root,root) +%_libdir/libasn1c.so.1* + +%files -n libasn1c-devel +%defattr(-,root,root) +%doc COPYING +%_includedir/asn1c/ +%_libdir/pkgconfig/*.pc +%_libdir/libasn1c.so + +%changelog -- cgit v1.2.3