Blob Blame Raw
Name:           hxtools
Version:        20120514
Release:        1%{?dist}
Summary:        A collection of several tools

Group:          Applications/System
# fd0ssh: LGPLv2 or LGPLv3
# ofl: Public Domain, but LGPVv2 or LPGLv3 because of linking with libHX
License:        LGPLv2 or LGPLv3
URL:            http://inai.de/projects/hxtools/
Source0:        http://inai.de/files/hxtools/hxtools-%{version}.tar.xz
Source1:        http://inai.de/files/hxtools/hxtools-%{version}.tar.xz.asc
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libHX-devel
# for ./autogen.sh / autoreconf
BuildRequires:  automake
# for sys/capability.h in printcaps.c
BuildRequires:  libcap-devel
# for libmount.h in suser/sysinfo.c
BuildRequires:  libmount-devel
# for pci/pci.h in suser/sysinfo.c
BuildRequires:  pciutils-devel
# for xcb/xcb.h in suser/sysinfo.c
BuildRequires:  libxcb-devel

%description
hxtools contains several tools for different tasks written by Jan Engelhardt.

Currently only tools needed for pam_mount are included in this package.


%prep
%setup -q


%build
./autogen.sh
%configure
make %{?_smp_mflags} V=1


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# remove unwanted files
# Using %%exclude in %%files pollutes the debuginfo package :-/
# This seems to be only build if some dependency is present
#rm "$RPM_BUILD_ROOT%%{_libexecdir}/hxtools/printcaps"
#rm "$RPM_BUILD_ROOT%%{_libexecdir}/hxtools/proc_iomem_count"
#rm "$RPM_BUILD_ROOT%%{_datadir}/rfc2307bis-utf8.schema"
#rm "$RPM_BUILD_ROOT%%{_mandir}/man8/xfs_irecover.8"*
rm "$RPM_BUILD_ROOT/%{_sysconfdir}/hxloginpref.conf"
rm "$RPM_BUILD_ROOT/%{_bindir}/checkbrack"
rm "$RPM_BUILD_ROOT/%{_bindir}/clock_info"
rm "$RPM_BUILD_ROOT/%{_bindir}/cwdiff"
rm "$RPM_BUILD_ROOT/%{_bindir}/declone"
rm "$RPM_BUILD_ROOT/%{_bindir}/fduphl"
rm "$RPM_BUILD_ROOT/%{_bindir}/fxterm"
rm "$RPM_BUILD_ROOT/%{_bindir}/git-author-stat"
rm "$RPM_BUILD_ROOT/%{_bindir}/git-export-patch"
rm "$RPM_BUILD_ROOT/%{_bindir}/git-forest"
rm "$RPM_BUILD_ROOT/%{_bindir}/git-track"
rm "$RPM_BUILD_ROOT/%{_bindir}/googtts"
rm "$RPM_BUILD_ROOT/%{_bindir}/gpsh"
rm "$RPM_BUILD_ROOT/%{_bindir}/man2html"
rm "$RPM_BUILD_ROOT/%{_bindir}/newns"
rm "$RPM_BUILD_ROOT/%{_bindir}/omixer"
rm "$RPM_BUILD_ROOT/%{_bindir}/oplay"
rm "$RPM_BUILD_ROOT/%{_bindir}/orec"
rm "$RPM_BUILD_ROOT/%{_bindir}/pesubst"
rm "$RPM_BUILD_ROOT/%{_bindir}/pmap_dirty"
rm "$RPM_BUILD_ROOT/%{_bindir}/qtar"
rm "$RPM_BUILD_ROOT/%{_bindir}/spec-beautifier"
rm "$RPM_BUILD_ROOT/%{_bindir}/ssa2srt"
rm "$RPM_BUILD_ROOT/%{_bindir}/su1"
rm "$RPM_BUILD_ROOT/%{_bindir}/sysinfo"
rm "$RPM_BUILD_ROOT/%{_bindir}/tailhex"
rm "$RPM_BUILD_ROOT/%{_bindir}/wktimer"
rm "$RPM_BUILD_ROOT/%{_bindir}/xcp"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/bsvplay"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/cctypeinfo"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/diff2php"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/doxygen-kerneldoc-filter"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/extract_d3pkg"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/extract_dxhog"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/extract_f3pod"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/extract_qupak"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/fnt2bdf"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/git-blame-stats"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/git-new-root"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/git-revert-stats"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/logontime"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/mailsplit"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/mod2ogg"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/mpg2ogg"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/netload"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/paddrspacesize"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/png2wx.pl"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/png2wx.py"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/printcaps"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/proc_iomem_count"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/proc_stat_signal_decode"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/psthreads"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/qplay"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/recursive_lower"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/shared.pm"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/sourcefuncsize"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/stxdb"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/utmp_register"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/vcsaview"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/vfontas"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/wavdiff"
rm "$RPM_BUILD_ROOT/%{_libexecdir}/hxtools/proc_stat_parse"
rm "$RPM_BUILD_ROOT/%{_datadir}/gitconfig"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxloginpref.conf"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/ahnv.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/ati.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/ega437_8x14.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/ega437_8x16.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/ega437_8x8.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/gotik-textura.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/i386/qwerty/us_jng.map"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/i386/qwerty/us_jng_vaiou3.map"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/i386/qwertz/de_jng.map"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/ital.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/misc/ahnv.pcf.gz"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/misc/mux.pcf.gz"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/misc/rhx.pcf.gz"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/misc/tosh.pcf.gz"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/mux.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/neuropol.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/nvidia.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/rhx.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools/kbd/tosh.fnt"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools_bashrc.bash"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools_dircolors"
rm "$RPM_BUILD_ROOT/%{_datadir}/hxtools_profile.bash"
rm "$RPM_BUILD_ROOT/%{_datadir}/rfc2307bis-utf8.schema"
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/bsvplay.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/cctypeinfo.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/checkbrack.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/clock_info.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/cwdiff.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/declone.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/diff2php.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/extract_d3pkg.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/extract_dxhog.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/extract_f3pod.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/extract_qupak.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/fduphl.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/fnt2bdf.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/fxterm.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/git-author-stat.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/git-export-patch.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/git-forest.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/git-revert-stats.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/git-track.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/mailsplit.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/man2html.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/mod2ogg.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/mpg2ogg.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/omixer.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/oplay.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/orec.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/pesubst.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/png2wx.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/psthreads.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/qplay.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/recursive_lower.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/sourcefuncsize.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/spec-beautifier.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/ssa2srt.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/stxdb.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/sysinfo.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/tailhex.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/vfontas.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/wavdiff.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/wktimer.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man1/xcp.1"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man7/hxtools.7"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/logontime.8"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/netload.8"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/newns.8"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/printcaps.8"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/utmp_register.8"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/vcsaview.8"*
rm "$RPM_BUILD_ROOT/%{_mandir}/man8/xfs_irecover.8"*


%clean
rm -rf $RPM_BUILD_ROOT


# Only include tools needed for pam_mount
%files
%defattr(-,root,root,-)
%doc LICENSE.GPL2 LICENSE.GPL3
%{_bindir}/ofl
%{_libexecdir}/hxtools/fd0ssh
%{_mandir}/man1/fd0ssh.1*
%{_mandir}/man1/ofl.1*


%changelog
* Wed Jun 06 2012 Till Maas <opensource@till.name> - 20120514-1
- Update to new release
- Update URL and Source0/1
- Update BuildRequires

* Wed Mar 21 2012 Till Maas <opensource@till.name> - 20120107-1
- Update to new release
- Remove upstreamed patch

* Thu Nov 24 2011 Till Maas <opensource@till.name> - 20110721-2
- Update BR: use automake instead of autoconf
- Use %% for rpm macros in comments

* Fri Jul 22 2011 Till Maas <opensource@till.name> - 20110721-1
- Update to new release
- Add patch to make newns build (missing _GNU_SOURCE)

* Thu May 19 2011 Till Maas <opensource@till.name> - 20110509-1
- Update to new release
- cleanup spec
- add BR: autoconf
- add BR: libcaps-devel

* Wed Mar 09 2011 Till Maas <opensource@till.name> - 20110308-2
- Include license files

* Wed Mar 09 2011 Till Maas <opensource@till.name> - 20110308-1
- Update to new release

* Mon Dec 27 2010 Till Maas <opensource@till.name> - 20101227-1
- Initial spec with only the programs needed by pam_mount