Name: brickd Version: 2.4.0 Release: 1%{?dist} Summary: Tinkerforge Brick Daemon License: GPLv2+ URL: https://www.tinkerforge.com/doc/Software/Brickd.html Source0: https://github.com/Tinkerforge/brickd/archive/v%{version}/brickd-%{version}.tar.gz Source1: https://github.com/Tinkerforge/daemonlib/archive/brickd-%{version}/brickd-daemonlib-%{version}.tar.gz # 2019-09-05: Merged upstream: https://github.com/Tinkerforge/brickd/pull/16 Patch0: brickd-2.4.0-DESTDIR.patch BuildRequires: gcc BuildRequires: libusb1-devel BuildRequires: make BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros Requires: systemd %description The Brick Daemon program is part of the Tinkerforge software infrastructure. It routes Tinkerforge Protocol (TFP) messages between Tinkerforge USB devices (Bricks) and TCP/IP sockets. This allows user programs to use TCP/IP sockets to communicate with Bricks and their Bricklets connected to USB without having to deal with USB themselves. The TCP/IP communication itself is encapsulated in API bindings available for various programming languages. %prep %autosetup -p1 tar --extract --transform 's,[^/]*,src/daemonlib,' --verbose --file '%{SOURCE1}' %build CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" %make_build -C src/brickd WITH_SYSTEMD=yes %install rm -rf $RPM_BUILD_ROOT %make_install -C src/brickd syslibdir=/usr/lib %post %systemd_post brickd.service %preun %systemd_preun brickd.service %postun %systemd_postun_with_restart brickd.service %files %license license.txt %doc README.rst %config(noreplace) %{_sysconfdir}/brickd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/brickd %{_bindir}/brickd %{_mandir}/man5/brickd.conf.5* %{_mandir}/man8/brickd.8* %{_unitdir}/brickd-resume.service %{_unitdir}/brickd.service %changelog * Thu Sep 05 2019 Till Maas - 2.4.0-1 - Initial release