# Generated by go2rpm 1.3 %bcond_without check # https://github.com/binwiederhier/pcopy %global goipath heckel.io/pcopy %global forgeurl https://github.com/binwiederhier/pcopy Version: 0.2.0 %gometa %global common_description %{expand: Shared clipboard across computers.} %global golicenses LICENSE %global godocs README.md Name: pcopy Release: 1%{?dist} Summary: Shared clipboard across computers # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} Source1: %{name}.sysusers BuildRequires: systemd-rpm-macros BuildRequires: golang(golang.org/x/crypto/pbkdf2) BuildRequires: golang(golang.org/x/crypto/ssh/terminal) BuildRequires: golang(golang.org/x/sys/unix) # Alternative name Provides: %{goname} = %{version}-%{release} Provides: %{goname}%{?_isa} = %{version}-%{release} %description %{common_description} %gopkg %prep %goprep %build # Set the build version info export LDFLAGS="-X main.version=%{version}-%{release} -X main.date=${SOURCE_DATE_EPOCH} " for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # Create directory skeleton mkdir -p %{buildroot}%{_localstatedir}/cache/%{name} mkdir -p %{buildroot}%{_sysconfdir}/%{name} mkdir -p %{buildroot}%{_sysusersdir} mkdir -p %{buildroot}%{_unitdir} # Install systemd resources install -pm 0644 init/pcopy.service %{buildroot}%{_unitdir}/%{name}.service install -pm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf # Create empty config files touch %{buildroot}%{_sysconfdir}/%{name}/server.conf %if %{with check} %check %gocheck %endif %pre %sysusers_create_compat %{SOURCE1} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md configs %{_bindir}/* %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %dir %attr(700,%{name},%{name}) %{_localstatedir}/cache/%{name} %dir %attr(700,%{name},%{name}) %{_sysconfdir}/%{name} %ghost %{_sysconfdir}/%{name}/server.conf %gopkgfiles %changelog * Wed Dec 16 23:17:07 EST 2020 Neal Gompa - 0.2.0-1 - Update to 0.2.0 * Wed Dec 16 20:39:38 EST 2020 Neal Gompa - 0.1.2-1 - Initial package