| 1 | # Note: this .spec is borrowed from help2man-1.46.4-1.fc22.src.rpm
|
|---|
| 2 |
|
|---|
| 3 | # Supported build option:
|
|---|
| 4 | #
|
|---|
| 5 | # --with nls ... build this package with --enable-nls
|
|---|
| 6 |
|
|---|
| 7 | Name: help2man
|
|---|
| 8 | Summary: Create simple man pages from --help output
|
|---|
| 9 | Version: 1.46.4
|
|---|
| 10 | Release: 1%{?dist}
|
|---|
| 11 | Group: Development/Tools
|
|---|
| 12 | License: GPLv3+
|
|---|
| 13 | URL: http://www.gnu.org/software/help2man
|
|---|
| 14 | #Source: ftp://ftp.gnu.org/gnu/help2man/help2man-%{version}.tar.xz
|
|---|
| 15 |
|
|---|
| 16 | %define svn_url http://svn.netlabs.org/repos/ports/help2man/trunk
|
|---|
| 17 | %define svn_rev 980
|
|---|
| 18 |
|
|---|
| 19 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 20 |
|
|---|
| 21 | BuildRequires: gcc make subversion zip
|
|---|
| 22 |
|
|---|
| 23 | %bcond_with nls
|
|---|
| 24 |
|
|---|
| 25 | %{!?with_nls:BuildArch: noarch}
|
|---|
| 26 |
|
|---|
| 27 | #BuildRequires: texinfo
|
|---|
| 28 | #BuildRequires: perl(Getopt::Long)
|
|---|
| 29 | #BuildRequires: perl(POSIX)
|
|---|
| 30 | #BuildRequires: perl(Text::ParseWords)
|
|---|
| 31 | #BuildRequires: perl(Text::Tabs)
|
|---|
| 32 | #BuildRequires: perl(strict)
|
|---|
| 33 | %{?with_nls:BuildRequires: perl(Locale::gettext) /usr/bin/msgfmt}
|
|---|
| 34 | %{?with_nls:BuildRequires: perl(Encode)}
|
|---|
| 35 | %{?with_nls:BuildRequires: perl(I18N::Langinfo)}
|
|---|
| 36 |
|
|---|
| 37 | #Requires(post): /sbin/install-info
|
|---|
| 38 | #Requires(preun): /sbin/install-info
|
|---|
| 39 |
|
|---|
| 40 | %description
|
|---|
| 41 | help2man is a script to create simple man pages from the --help and
|
|---|
| 42 | --version output of programs.
|
|---|
| 43 |
|
|---|
| 44 | Since most GNU documentation is now in info format, this provides a
|
|---|
| 45 | way to generate a placeholder man page pointing to that resource while
|
|---|
| 46 | still providing some useful information.
|
|---|
| 47 |
|
|---|
| 48 | %prep
|
|---|
| 49 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 50 | %setup -q
|
|---|
| 51 | %else
|
|---|
| 52 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 53 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 54 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 55 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 56 | %endif
|
|---|
| 57 |
|
|---|
| 58 | # Create files necessary for configure
|
|---|
| 59 | bootstrap.sh
|
|---|
| 60 |
|
|---|
| 61 | %build
|
|---|
| 62 | %configure --%{!?with_nls:disable}%{?with_nls:enable}-nls --libdir=%{_libdir}/help2man
|
|---|
| 63 | make %{?_smp_mflags}
|
|---|
| 64 |
|
|---|
| 65 | %install
|
|---|
| 66 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 67 | # Disable install_l10n for now since it depends on Perl(Locale:gettext) which is missing ATM
|
|---|
| 68 | #make install_l10n DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 69 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 70 | #%find_lang %name --with-man
|
|---|
| 71 |
|
|---|
| 72 | #%post
|
|---|
| 73 | #/sbin/install-info %{_infodir}/help2man.info %{_infodir}/dir 2>/dev/null || :
|
|---|
| 74 |
|
|---|
| 75 | #%preun
|
|---|
| 76 | #if [ $1 -eq 0 ]; then
|
|---|
| 77 | # /sbin/install-info --delete %{_infodir}/help2man.info \
|
|---|
| 78 | # %{_infodir}/dir 2>/dev/null || :
|
|---|
| 79 | #fi
|
|---|
| 80 |
|
|---|
| 81 | # See above
|
|---|
| 82 | #%files -f %name.lang
|
|---|
| 83 | %files
|
|---|
| 84 | %doc README NEWS THANKS COPYING
|
|---|
| 85 | %{_bindir}/help2man
|
|---|
| 86 | %{_infodir}/*
|
|---|
| 87 | %{_mandir}/man1/*
|
|---|
| 88 |
|
|---|
| 89 | %if %{with nls}
|
|---|
| 90 | %{_libdir}/help2man
|
|---|
| 91 | %endif
|
|---|
| 92 |
|
|---|
| 93 | %changelog
|
|---|
| 94 | * Tue Jan 20 2015 Dmitriy Kuminov <coding@dmik.org> 1.46.4-1
|
|---|
| 95 | - Initial package for version 1.46.4.
|
|---|