Blob Blame History Raw
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

Summary: Cross platform C library for parsing GNU style command line arguments
Name: argtable
Version: 2.13
Release: 8%{?dist}
License: LGPLv2+
Url: http://argtable.sourceforge.net/
Source: http://prdownloads.sourceforge.net/argtable/%{name}2-13.tar.gz
Group: Applications/Internet
BuildRequires: pkgconfig

%description
Argtable is an ANSI C library for parsing GNU style command line
arguments. It enables a program's command line syntax to be defined in
the source code as an array of argtable structs. The command line is
then parsed according to that specification and the resulting values
are returned in those same structs where they are accessible to the main
program. Both tagged (-v, --verbose, --foo=bar) and untagged arguments
are supported, as are multiple instances of each argument.
Syntax error handling is automatic.

%package devel
Summary: Development package that includes the argtable header files
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
Header and development files for using argtable

%prep
%setup -q -n %{name}2-13

%build
%configure --disable-static --docdir=%{_pkgdocdir}
make %{?_smp_mflags} 

%install
make DESTDIR=${RPM_BUILD_ROOT} install
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la
install -pm 644 AUTHORS ChangeLog COPYING README ${RPM_BUILD_ROOT}%{_pkgdocdir}

%files
%dir %{_pkgdocdir}
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/ChangeLog
%{_pkgdocdir}/COPYING
%{_pkgdocdir}/README
%{_libdir}/libargtable2.so.*

%files devel
%{_libdir}/libargtable2.so
%{_includedir}/argtable2.h
%{_libdir}/pkgconfig/argtable2.pc

%doc %{_mandir}/man3/*
%{_pkgdocdir}/*
%exclude %{_pkgdocdir}/AUTHORS
%exclude %{_pkgdocdir}/ChangeLog
%exclude %{_pkgdocdir}/COPYING
%exclude %{_pkgdocdir}/README

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jul 12 2014 Mukundan Ragavan <nonamedotc@gmail.com> - 2.13-7
- Rebuilt for F22

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Dec 13 2013 Ville Skyttä <ville.skytta@iki.fi> - 2.13-5
- Install doc to %%{_pkgdocdir} where available (#993671).
- Don't duplicate docs in main and -devel.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Oct 27 2012 Paul Wouters <pwouters@redhat.com> - 2.13-2
- Removed el5 specific spec options

* Sat Oct 27 2012 Paul Wouters <pwouters@redhat.com> - 2.13-1
- Initial package
- Notified upstream of incorrect-fsf-address