# More info on packaging this: # http://lists.fedoraproject.org/pipermail/devel/2011-May/151626.html # https://bugzilla.redhat.com/show_bug.cgi?id=707993 Name: 9base Version: 6 Release: 3%{?dist} Summary: A port of various original Plan 9 tools for Unix Group: Applications/System License: LPL and MIT URL: http://tools.suckless.org/%{name} Source0: http://dl.suckless.org/tools/%{name}-%{version}.tar.gz Patch0: %{name}-6-config.patch Patch1: %{name}-6-exclusive-tmp.patch %description This is a port of various original Plan 9 tools for Unix, based on plan9port. %prep %setup -q %patch0 -p1 %patch1 -p1 %build make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} PREFIX=%{_libdir}/%{name} # Drop empty man-pages cd %{buildroot}%{_libdir}/%{name}/share/man/man1 for mp in *; do test -s ${mp} || rm -vf ${mp}; done cd - # Correct permissions chmod 644 %{buildroot}%{_libdir}/%{name}/etc/rcmain chmod 644 %{buildroot}%{_libdir}/%{name}/lib/troff/tmac/sendcover chmod 644 %{buildroot}%{_libdir}/%{name}/lib/troff/font/devutf/mkMAP # Correct paths to rc for script in \ %{buildroot}%{_libdir}/%{name}/lib/troff/tmac/sendcover \ %{buildroot}%{_libdir}/%{name}/lib/troff/font/devutf/mkMAP do sed -i '1s?#!/bin/rc?#!%{_libdir}/9base/bin/rc?' ${script} done # Install 9base prefixed symlinks for binaries mkdir -p %{buildroot}%{_bindir} cd %{buildroot}%{_libdir}/%{name}/bin for binary in *; do ln -sf %{_libdir}/%{name}/bin/${binary} \ %{buildroot}%{_bindir}/%{name}-${binary} done # Install 9base prefixed copies for manpages # We install copies to deal with the forced RPM compression. # The original Plan 9 manpages were plain roff and the system # man(1) wouldn't be able to read them compressed. mkdir -p %{buildroot}%{_mandir}/man1 cd %{buildroot}%{_libdir}/%{name}/share/man/man1 for manpage in *; do cp %{buildroot}%{_libdir}/%{name}/share/man/man1/${manpage} \ %{buildroot}%{_mandir}/man1/%{name}-${manpage} done %files %doc LICENSE README %{_libdir}/%{name} %{_bindir}/%{name}-* %{_mandir}/man1/%{name}-*.1* %changelog * Thu Feb 27 2014 Petr Ĺ abata - 6-3 - Putting everything into %%{_libdir}/9base * Mon May 30 2011 Petr Sabata - 6-2 - Use %%{_bindir}/plan9 instead of %%{_libexecdir}/plan9 for 9base binaries * Thu May 26 2011 Petr Sabata - 6-1 - Initial commit