diff --git a/Botan-2.19.1.tar.xz b/Botan-2.19.1.tar.xz new file mode 100644 index 0000000..7fa9ec7 Binary files /dev/null and b/Botan-2.19.1.tar.xz differ diff --git a/botan2.spec b/botan2.spec new file mode 100644 index 0000000..0b7aa5a --- /dev/null +++ b/botan2.spec @@ -0,0 +1,128 @@ +%global major_version 2 + +Name: botan2 +Version: 2.19.1 +Release: 1 +Summary: Crypto and TLS for C++11 + +License: BSD +URL: https://botan.randombit.net/ +Source0: https://botan.randombit.net/releases/Botan-%{version}.tar.xz + +BuildRequires: gcc-c++ python3 python3-devel python3-sphinx python-docutils +BuildRequires: bzip2-devel zlib-devel openssl-devel make + +%description +Botan is a BSD-licensed crypto library written in C++. It provides a +wide variety of basic cryptographic algorithms, X.509 certificates and +CRLs, PKCS \#10 certificate requests, a filter/pipe message processing +system, and a wide variety of other features, all written in portable +C++. The API reference, tutorial, and examples may help impart the +flavor of the library. This is the current stable release branch 2.x +of Botan. + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch + +%description doc +%{summary} + +This package contains HTML documentation for %{name}. + + +%package -n python3-%{name} +Summary: Python3 bindings for %{name} +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +%{summary} + +This package contains the Python3 binding for %{name}. + + +%prep +%autosetup -n Botan-%{version} + + +%build +export CXXFLAGS="${CXXFLAGS:-%{optflags}}" + +%global enable_modules bzip2,zlib,openssl + +%{__python3} ./configure.py \ + --prefix=%{_prefix} \ + --libdir=%{_lib} \ + --docdir=%{_docdir} \ + --cc=gcc \ + --os=linux \ + --cpu=%{_arch} \ + --enable-modules=%{enable_modules} \ + --with-python-version=%{python3_version} \ + --with-sphinx \ + --with-rst2man \ + --distribution-info="$(source /etc/os-release ; echo "$NAME")" \ + --disable-static-library \ + --with-debug-info + +# work around https://github.com/randombit/botan/issues/2130 +%make_build PYTHON_EXE=%{__python3} + +%install +make install PYTHON_EXE=%{__python3} DESTDIR=%{buildroot} + +sed -e '1{/^#!/d}' -i %{buildroot}%{python3_sitearch}/botan2.py + +# doc installation fixups +mv %{buildroot}%{_docdir}/botan-%{version} %{buildroot}%{_pkgdocdir} +rm -r %{buildroot}%{_pkgdocdir}/handbook/{.doctrees,.buildinfo} + + +%ldconfig_scriptlets + + +%files +%license license.txt +%dir %{_pkgdocdir} +%{_pkgdocdir}/*.txt +%{_libdir}/libbotan-%{major_version}.so.19* +%{_bindir}/botan +%{_mandir}/man1/botan.1.gz + + +%files devel +%license license.txt +%{_includedir}/* +%{_libdir}/libbotan-%{major_version}.so +%{_libdir}/pkgconfig/botan-%{major_version}.pc + + +%files doc +%license license.txt +%dir %{_pkgdocdir} +%{_pkgdocdir}/handbook + + +%files -n python3-%{name} +%license license.txt +%{python3_sitearch}/%{name}.py +%{python3_sitearch}/__pycache__/* + + +%check +LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./botan-test + + +%changelog +* Thu Jul 14 2022 misaka00251 - 2.19.1-1 +- Init package diff --git a/botan2.yaml b/botan2.yaml new file mode 100644 index 0000000..251284c --- /dev/null +++ b/botan2.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: https://github.com/randombit/botan.git +tag_prefix: "" +separator: "."