diff --git a/CRYPTOPP_8_2_0.tar.gz b/CRYPTOPP_8_2_0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7451ff3621242648537176c00f8c06e3cc056413 Binary files /dev/null and b/CRYPTOPP_8_2_0.tar.gz differ diff --git a/cryptopp.spec b/cryptopp.spec new file mode 100755 index 0000000000000000000000000000000000000000..95c52433a1316f0bcdeeebf96df6abbacfc9ba45 --- /dev/null +++ b/cryptopp.spec @@ -0,0 +1,87 @@ +%global _version CRYPTOPP_8_2_0 +Name: cryptopp +Version: 8.2.0 +Release: 1 +Summary: Crypto++ Library is a free C++ class library of cryptographic schemes + +License: BSL-1.0 + +URL: https://www.cryptopp.com/ +Source0: https://github.com/weidai11/cryptopp/archive/%{_version}.tar.gz + +BuildRequires: gcc make + +%description +Crypto++ Library is a free C++ class library of cryptographic schemes. +The Crypto++ library was orginally written by Wei Dai. The library is now maintained by several team members and the community. +Currently the library contains algorithms like AES, RSA, MD5 etc.. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the header files and libraries for developing with %{name}. + +%prep +%autosetup -n %{name}-%{_version} + +%build +%make_build + +%install +# doc +mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/TestData +mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/TestVectors +cp -a %{_builddir}/%{name}-%{_version}/TestData/*.dat %{buildroot}%{_datadir}/%{name}-%{version}/TestData +cp -a %{_builddir}/%{name}-%{_version}/TestVectors/*.txt %{buildroot}%{_datadir}/%{name}-%{version}/TestVectors + +# lib file +mkdir -p %{buildroot}/%{_libdir} +cp -a %{_builddir}/%{name}-%{_version}/libcryptopp.a %{buildroot}%{_libdir}/libcryptopp-%{version}.a + +# include file +mkdir -p %{buildroot}/%{_includedir}/%{name} +cp -a %{_builddir}/%{name}-%{_version}/*.h %{buildroot}/%{_includedir}/%{name} + +# executable file +mkdir -p %{buildroot}/%{_bindir} +cp -a %{_builddir}/%{name}-%{_version}/cryptest.exe %{buildroot}%{_bindir} + +%clean +rm -rf %{buildroot} + +%files +%defattr(0644,root,root,0644) +%doc History.txt Install.txt Readme.txt +%license License.txt +%{_datadir}/%{name}-%{version}/TestData/*.dat +%{_datadir}/%{name}-%{version}/TestVectors/*.txt +%attr(0755,root,root) %{_bindir}/cryptest.exe + +%files devel +%defattr(0644,root,root,0644) +%{_libdir}/*.a +%{_includedir}/%{name}/*.h + +%post devel +ln -s %{_libdir}/libcryptopp-%{version}.a %{_libdir}/libcryptopp.a + +%postun devel +if [ -h %{_libdir}/libcryptopp.a ]; then + rm -f %{_libdir}/libcryptopp.a +fi +if [ -d %{_includedir}/%{name} ]; then + rm -rf %{_includedir}/%{name} +fi + +%postun +if [ -d %{_datadir}/%{name}-%{version} ]; then + rm -rf %{_datadir}/%{name}-%{version} +fi + +%changelog +* Thu Sep 10 2020 +- Package init + + diff --git a/cryptopp.yaml b/cryptopp.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7c9b39a2b1745495b99d9100ecde0eddcbebb3c7 --- /dev/null +++ b/cryptopp.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: weidai11/cryptopp +tag_prefix: ^CRYPTOPP_ +seperator: _