e94c1ee
Name:           libb64
e94c1ee
Version:        1.2
f9836b5
Release:        7%{?dist}
e94c1ee
Summary:        Tools for fast encoding/decoding data into and from a base64-encoded format
e94c1ee
e94c1ee
License:        Public Domain
e94c1ee
URL:            http://libb64.sourceforge.net/
e94c1ee
Source0:        https://downloads.sourceforge.net/%{name}/%{name}-%{version}.src.zip
e94c1ee
e94c1ee
e94c1ee
BuildRequires: gcc-c++
e94c1ee
e94c1ee
%description
e94c1ee
Base64 uses a subset of displayable ASCII characters, and is therefore a useful
e94c1ee
encoding for storing binary data in a text file, such as XML, or sending binary
e94c1ee
data over text-only email.
e94c1ee
e94c1ee
libb64 is a library of ANSI C routines for fast encoding/decoding data into and
e94c1ee
from a base64-encoded format. C++ wrappers are included, as well as the source
e94c1ee
code for standalone encoding and decoding executables.
e94c1ee
e94c1ee
e94c1ee
e94c1ee
%package        devel
e94c1ee
Summary:        Development files for %{name}
e94c1ee
# Upstream only provides a static library
e94c1ee
Provides:      %{name}-static = %{version}-%{release}
e94c1ee
# Does not need to require the base package as it is complete itself
e94c1ee
e94c1ee
%description    devel
e94c1ee
The %{name}-devel package contains the library and header files for developing
e94c1ee
applications that use %{name}.
e94c1ee
e94c1ee
e94c1ee
%package tools
e94c1ee
Summary:        %{name}-b64 binary provided by %{name}
e94c1ee
e94c1ee
%description tools
e94c1ee
This package provides the %{name}-b64 binary tool for encoding to and decoding
e94c1ee
from the Base64 scheme. Please install the %{name}-devel package to develop
e94c1ee
software using %{name}.
e94c1ee
e94c1ee
%prep
e94c1ee
%autosetup
e94c1ee
e94c1ee
# Remove unneeded flags
e94c1ee
sed -i '/-O3/ d' src/Makefile
e94c1ee
sed -i '/pedantic/ d' src/Makefile
e94c1ee
e94c1ee
e94c1ee
%build
e94c1ee
%set_build_flags
e94c1ee
%make_build
e94c1ee
e94c1ee
e94c1ee
%install
e94c1ee
# Upstream doesn't provide any install bits in the Makefile
e94c1ee
# static lib
e94c1ee
install -D -m 0644 -p src/libb64.a $RPM_BUILD_ROOT/%{_libdir}/libb64.a
e94c1ee
# binary, rename to prevent conflict with coreutils binary
e94c1ee
install -D -m 0755 -p base64/base64 $RPM_BUILD_ROOT/%{_bindir}/libb64-base64
e94c1ee
# headers
e94c1ee
install -D -m 0644 -p -t $RPM_BUILD_ROOT/%{_includedir}/b64/  include/b64/*
e94c1ee
e94c1ee
# Only static, so we don't need ldconfig scriptlets
e94c1ee
e94c1ee
e94c1ee
%files tools
e94c1ee
%license LICENSE
e94c1ee
%doc AUTHORS README
e94c1ee
%{_bindir}/libb64-base64
e94c1ee
e94c1ee
%files devel
e94c1ee
%license LICENSE
e94c1ee
%{_includedir}/b64
e94c1ee
%{_libdir}/libb64.a
e94c1ee
e94c1ee
%changelog
f9836b5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
f9836b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f9836b5
1c5b089
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-6
1c5b089
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1c5b089
192c0fb
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-5
192c0fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
192c0fb
1fa3e7b
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-4
1fa3e7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1fa3e7b
e94c1ee
* Tue Nov 06 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2-3
e94c1ee
- Move binary to -tools sub package
e94c1ee
- Rename binary to prevent conflict
e94c1ee
- Improve summary and description
e94c1ee
- Prevent addition to compiler flags
e94c1ee
- Do not require main package from devel
e94c1ee
- Do not use empty TODO file
e94c1ee
e94c1ee
* Sun Nov 04 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2-2
e94c1ee
- Do not use description macro
e94c1ee
- Use easier macro for build flags
e94c1ee
e94c1ee
* Sat Nov 03 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2-1
e94c1ee
- Initial build