File objfw.spec of Package objfw
%global toolchain clang
# LTO makes configure's double endianess test fail.
%global _lto_cflags %nil
#
# spec file for package objfw
#
Name: objfw
Version: 1.4.1
Release: 1%{?dist}
Summary: Portable, lightweight framework for the Objective-C language
License: LGPL-3.0-only
Group: Development/Libraries
URL: https://git.nil.im/ObjFW/ObjFW
Source0: objfw-%{version}.tar.gz
Source1: objfw-%{version}.tar.gz.sig
Source2: objfw-rpmlintrc
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: clang
BuildRequires: make
BuildRequires: pkgconfig(openssl)
BuildRequires: doxygen
BuildRequires: lksctp-tools-devel
Requires: libobjfw1%{_isa} = %{version}-%{release}
Requires: libobjfw1-devel%{_isa} = %{version}-%{release}
Requires: libobjfwrt1%{_isa} = %{version}-%{release}
Requires: libobjfwrt1-devel%{_isa} = %{version}-%{release}
Requires: libobjfwtls1%{_isa} = %{version}-%{release}
Requires: libobjfwtls1-devel%{_isa} = %{version}-%{release}
Requires: libobjfwhid1%{_isa} = %{version}-%{release}
Requires: libobjfwhid1-devel%{_isa} = %{version}-%{release}
Requires: ofarc%{_isa} = %{version}-%{release}
Requires: ofdns%{_isa} = %{version}-%{release}
Requires: ofhash%{_isa} = %{version}-%{release}
Requires: ofhttp%{_isa} = %{version}-%{release}
Requires: ofgctester%{_isa} = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
ObjFW is a portable, lightweight framework for the Objective-C language. It
enables you to write an application in Objective-C that will run on any
platform supported by ObjFW without having to worry about differences between
operating systems or various frameworks you would otherwise need if you want to
be portable.
It supports all modern Objective-C features when using Clang, but is also
compatible with GCC ≥ 4.6 to allow maximum portability.
ObjFW also comes with its own lightweight and extremely fast Objective-C
runtime, which in real world use cases was found to be significantly faster
than both GNU's and Apple's runtime.
%package -n libobjfw1
Summary: ObjFW library
Group: Development/Libraries
%description -n libobjfw1
The libobjfw package contains the library needed by programs using ObjFW.
%package -n libobjfw1-devel
Summary: Header files, libraries and tools for libobjfw
Group: Development/Libraries
Requires: libobjfw1 = %{version}
%description -n libobjfw1-devel
The libobjfw-devel package contains the header files, libraries and tools to
develop programs using ObjFW.
%package -n libobjfwrt1
Summary: ObjFW Objective-C runtime library
Group: Development/Libraries
%description -n libobjfwrt1
The libobjfwrt package contains ObjFW's Objective-C runtime library.
%package -n libobjfwrt1-devel
Summary: Header files and libraries for libobjfwrt
Group: Development/Libraries
Requires: libobjfwrt1 = %{version}
%description -n libobjfwrt1-devel
The libobjfwrt-devel package contains header files and libraries for ObjFW's
Objective-C runtime library.
%package -n libobjfwtls1
Summary: TLS support for ObjFW
Group: Development/Libraries
%description -n libobjfwtls1
The libobjfwtls package contains TLS support for ObjFW.
%package -n libobjfwtls1-devel
Summary: Header files and libraries for libobjfwtls
Group: Development/Libraries
Requires: libobjfwtls1 = %{version}
Requires: libobjfw1-devel = %{version}
%description -n libobjfwtls1-devel
The libobjfwtls-devel package contains header files and libraries for TLS
support for ObjFW.
%package -n libobjfwhid1
Summary: HID support for ObjFW
Group: Development/Libraries
%description -n libobjfwhid1
The libobjfwhid package contains HID support for ObjFW.
%package -n libobjfwhid1-devel
Summary: Header files and libraries for libobjfwhid
Group: Development/Libraries
Requires: libobjfwhid1 = %{version}
Requires: libobjfw1-devel = %{version}
%description -n libobjfwhid1-devel
The libobjfwhid-devel package contains header files and libraries for HID
support for ObjFW.
%package -n ofarc
Summary: Utility for handling ZIP, Tar, LHA and Zoo archives
Group: Utilities
%description -n ofarc
ofarc is a multi-format archive utility that allows creating, listing,
extracting and modifying ZIP, Tar, LHA and Zoo archives using ObjFW's classes
for various archive types.
%package -n ofdns
Summary: Utility for performing DNS requests on the command line
Group: Utilities
%description -n ofdns
ofdns is an utility for performing DNS requests on the command line using
ObjFW's DNS resolver.
%package -n ofhash
Summary: Utility to hash files with various cryptographic hash functions
Group: Utilities
%description -n ofhash
ofhash is an utility to hash files with various cryptographic hash functions
(even using different algorithms at once) using ObjFW's classes for various
cryptographic hashes.
%package -n ofhttp
Summary: Command line downloader for HTTP(S)
Group: Utilities
%description -n ofhttp
ofhttp is a command line downloader for HTTP and HTTPS using ObjFW's
OFHTTPClient class. It supports all features one would expect from a modern
command line downloader such as resuming of downloads, using a SOCKS5 proxy, a
modern terminal-based UI, etc.
%package -n ofgctester
Summary: Game controller tester for the terminal
%description -n ofgctester
ofgctester is a game controller tester for the terminal.
%package doc
Summary: Documentation for ObjFW
BuildArch: noarch
Group: Documentation
%description doc
Documentation for ObjFW.
%prep
%setup -q
%build
./autogen.sh
%configure OBJC=clang OBJCFLAGS="%{optflags}" --disable-rpath
make %{?_smp_mflags}
make docs
%install
set -x
%make_install
install -dm755 %{buildroot}%{_docdir}/%{name}
cp -r docs %{buildroot}%{_docdir}/%{name}
find %{buildroot} -type f '(' -name "*.so*" -o -name "*.a" -o -executable ')' \
-exec file {} ';' | grep ELF | cut -d: -f1 | xargs strip --strip-debug || true
%check
make check
%files
%license COPYING COPYING.LESSER
%files -n libobjfw1
%license COPYING COPYING.LESSER
%{_libdir}/libobjfw.so.1*
%files -n libobjfw1-devel
%license COPYING COPYING.LESSER
%{_bindir}/objfw-compile
%{_bindir}/objfw-config
%{_bindir}/objfw-embed
%{_bindir}/objfw-new
%{_includedir}/ObjFW
%{_includedir}/ObjFWTest
%{_libdir}/libobjfw.so
%{_libdir}/libobjfwtest.a
%{_libdir}/objfw-config
%{_libdir}/objfw-config/ObjFWTest.oc
%{_libdir}/objfw-config/ObjFWTLS.oc
%{_libdir}/objfw-config/ObjFWHID.oc
%{_mandir}/man1/objfw-compile.1.gz
%{_mandir}/man1/objfw-config.1.gz
%{_mandir}/man1/objfw-embed.1.gz
%{_mandir}/man1/objfw-new.1.gz
%files -n libobjfwrt1
%license COPYING COPYING.LESSER
%{_libdir}/libobjfwrt.so.1*
%files -n libobjfwrt1-devel
%license COPYING COPYING.LESSER
%{_includedir}/ObjFWRT
%{_libdir}/libobjfwrt.so
%files -n libobjfwtls1
%license COPYING COPYING.LESSER
%{_libdir}/libobjfwtls.so.1*
%files -n libobjfwtls1-devel
%license COPYING COPYING.LESSER
%{_includedir}/ObjFWTLS
%{_libdir}/libobjfwtls.so
%files -n libobjfwhid1
%license COPYING COPYING.LESSER
%{_libdir}/libobjfwhid.so.1*
%files -n libobjfwhid1-devel
%license COPYING COPYING.LESSER
%{_includedir}/ObjFWHID
%{_libdir}/libobjfwhid.so
%files -n ofarc
%license COPYING COPYING.LESSER
%{_bindir}/ofarc
%{_mandir}/man1/ofarc.1*
%{_datadir}/ofarc
%files -n ofdns
%license COPYING COPYING.LESSER
%{_bindir}/ofdns
%{_mandir}/man1/ofdns.1*
%{_datadir}/ofdns
%files -n ofhash
%license COPYING COPYING.LESSER
%{_bindir}/ofhash
%{_mandir}/man1/ofhash.1*
%{_datadir}/ofhash
%files -n ofhttp
%license COPYING COPYING.LESSER
%{_bindir}/ofhttp
%{_mandir}/man1/ofhttp.1*
%{_datadir}/ofhttp
%files -n ofgctester
%license COPYING COPYING.LESSER
%{_bindir}/ofgctester
%files doc
%license COPYING COPYING.LESSER
%{_docdir}/objfw
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n libobjfw1 -p /sbin/ldconfig
%postun -n libobjfw1 -p /sbin/ldconfig
%post -n libobjfwrt1 -p /sbin/ldconfig
%postun -n libobjfwrt1 -p /sbin/ldconfig
%post -n libobjfwtls1 -p /sbin/ldconfig
%postun -n libobjfwtls1 -p /sbin/ldconfig
%post -n libobjfwhid1 -p /sbin/ldconfig
%postun -n libobjfwhid1 -p /sbin/ldconfig
%changelog