1a259c
1a259c
%define show_all_cmds       1
1a259c
%define broken_fed_dbg_opts 0
1a259c
%define multilib_inst       1
1a259c
1a259c
%if %{show_all_cmds}
1a259c
%define policy_cflags_hide HIDE=
1a259c
%else
1a259c
%define policy_cflags_hide %{nil}
1a259c
%endif
1a259c
1a259c
%if %{broken_fed_dbg_opts}
1a259c
# Variable name explains itself.
1a259c
%define policy_cflags_broken DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=
1a259c
%else
1a259c
%define policy_cflags_broken %{nil}
1a259c
%endif
1a259c
1a259c
%define policy_cflags %{policy_cflags_hide}  %{policy_cflags_broken}
1a259c
1a259c
%if %{multilib_inst}
1a259c
%define ustr_make_install install-multilib-linux
1a259c
%else
1a259c
%define ustr_make_install install
1a259c
%endif
1a259c
1a259c
1a259c
Name: ustr
1a259c
Version: 1.0.4
1a259c
Release: 16%{?dist}
1a259c
Summary: String library, very low memory overhead, simple to import
1a259c
Group: System Environment/Libraries
1a259c
License: MIT or LGPLv2+ or BSD
1a259c
URL: http://www.and.org/ustr/
1a259c
Source0: http://www.and.org/ustr/%{version}/%{name}-%{version}.tar.bz2
1a259c
Patch0: c99-inline.patch
1a259c
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1a259c
# BuildRequires: make gcc sed
1a259c
1a259c
%description
1a259c
 Micro string library, very low overhead from plain strdup() (Ave. 44% for
1a259c
0-20B strings). Very easy to use in existing C code. At it's simplest you can
1a259c
just include a single header file into your .c and start using it.
1a259c
 This package also distributes pre-built shared libraries.
1a259c
1a259c
%package devel
1a259c
Summary: Development files for %{name}
1a259c
Group: Development/Libraries
1a259c
# This isn't required, but Fedora policy makes it so
1a259c
Requires: pkgconfig >= 0.14
1a259c
Requires: %{name} = %{version}-%{release}
1a259c
1a259c
%description devel
1a259c
 Header files for the Ustr string library, and the .so to link with.
1a259c
 Also includes a %{name}.pc file for pkg-config usage.
1a259c
 Includes the ustr-import tool, for if you jsut want to include
1a259c
the code in your projects ... you don't have to link to the shared lib.
1a259c
1a259c
%package static
1a259c
Summary: Static development files for %{name}
1a259c
Group: Development/Libraries
1a259c
Requires: %{name}-devel = %{version}-%{release}
1a259c
1a259c
%description static
1a259c
 Static library for the Ustr string library.
1a259c
1a259c
%package debug
1a259c
Summary: Development files for %{name}, with debugging options turned on
1a259c
Group: Development/Libraries
1a259c
# This isn't required, but Fedora policy makes it so
1a259c
Requires: pkgconfig >= 0.14
1a259c
Requires: %{name}-devel = %{version}-%{release}
1a259c
1a259c
%description debug
1a259c
 Header files and dynamic libraries for a debug build of the Ustr string
1a259c
library.
1a259c
 Also includes a %{name}-debug.pc file for pkg-config usage.
1a259c
1a259c
%package debug-static
1a259c
Summary: Static development files for %{name}, with debugging options turned on
1a259c
Group: Development/Libraries
1a259c
Requires: %{name}-debug = %{version}-%{release}
1a259c
1a259c
%description debug-static
1a259c
 Static library for the debug build of the Ustr string library.
1a259c
1a259c
%prep
1a259c
%setup -q
1a259c
%patch0 -p1
1a259c
1a259c
%build
1a259c
make %{?_smp_mflags} all-shared CFLAGS="${CFLAGS:-%optflags}" %{policy_cflags}
1a259c
1a259c
%check
1a259c
%if %{?chk}%{!?chk:1}
1a259c
make %{?_smp_mflags} check CFLAGS="${CFLAGS:-%optflags}" %{policy_cflags}
1a259c
%endif
1a259c
1a259c
%install
1a259c
rm -rf $RPM_BUILD_ROOT
1a259c
make $@ %{ustr_make_install} prefix=%{_prefix} \
1a259c
                bindir=%{_bindir}         mandir=%{_mandir} \
1a259c
                datadir=%{_datadir}       libdir=%{_libdir} \
1a259c
                includedir=%{_includedir} libexecdir=%{_libexecdir} \
1a259c
                DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true HIDE=
1a259c
1a259c
%clean
1a259c
rm -rf $RPM_BUILD_ROOT
1a259c
1a259c
%post -p /sbin/ldconfig
1a259c
1a259c
%postun -p /sbin/ldconfig
1a259c
1a259c
%post debug -p /sbin/ldconfig
1a259c
1a259c
%postun debug -p /sbin/ldconfig
1a259c
1a259c
%files
1a259c
%defattr(-,root,root,-)
1a259c
%{_libdir}/libustr-1.0.so.*
1a259c
%doc ChangeLog LICENSE* README NEWS
1a259c
1a259c
%files devel
1a259c
%defattr(-,root,root,-)
1a259c
%{_datadir}/ustr-%{version}
1a259c
%{_bindir}/ustr-import
1a259c
%if %{multilib_inst}
1a259c
%{_libexecdir}/ustr-%{version}
1a259c
%endif
1a259c
%{_includedir}/ustr.h
1a259c
%{_includedir}/ustr-*.h
1a259c
%exclude %{_includedir}/ustr*debug*.h
1a259c
%{_libdir}/pkgconfig/ustr.pc
1a259c
%{_libdir}/libustr.so
1a259c
%{_datadir}/doc/ustr-devel-%{version}
1a259c
%{_mandir}/man1/*
1a259c
%{_mandir}/man3/*
1a259c
1a259c
%files static
1a259c
%{_libdir}/libustr.a
1a259c
1a259c
%files debug
1a259c
%defattr(-,root,root,-)
1a259c
%{_libdir}/libustr-debug-1.0.so.*
1a259c
%{_libdir}/libustr-debug.so
1a259c
%{_includedir}/ustr*debug*.h
1a259c
%{_libdir}/pkgconfig/ustr-debug.pc
1a259c
1a259c
%files debug-static
1a259c
%{_libdir}/libustr-debug.a
1a259c
1a259c
1a259c
%changelog
1a259c
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.4-16
1a259c
- Mass rebuild 2014-01-24
1a259c
1a259c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.4-15
1a259c
- Mass rebuild 2013-12-27
1a259c
1a259c
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-14
1a259c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1a259c
1a259c
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-13
1a259c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1a259c
1a259c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-12
1a259c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1a259c
1a259c
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-11
1a259c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1a259c
1a259c
* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 1.0.4-10
1a259c
- Use bzipped upstream tarball.
1a259c
1a259c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-9
1a259c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1a259c
1a259c
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-8
1a259c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
1a259c
1a259c
* Fri Jun 13 2008 James Antill <james@fedoraproject.org> - 1.0.4-7
1a259c
- Fix c99 inline problems, newer GCC
1a259c
1a259c
* Sun Mar  9 2008 James Antill <james@fedoraproject.org> - 1.0.4-6
1a259c
- Fix dir. ownership bug.
1a259c
- Resolves: rhbz#436711
1a259c
1a259c
* Wed Mar  5 2008 James Antill <james@fedoraproject.org> - 1.0.4-5
1a259c
- New new upstream: 1.0.4
1a259c
1a259c
* Thu Feb 21 2008 Dennis Gilmore <dennis@ausil.us> - 1.0.3-5
1a259c
- set broken_fed_dbg_opts to 0 its the recomended option upstream
1a259c
- this works around sparc GCC problems
1a259c
- add smpflags and cflags to make check
1a259c
1a259c
* Wed Feb 13 2008 James Antill <james@fedoraproject.org> - 1.0.3-4
1a259c
- Preserve timestamps for shared multilib. files.
1a259c
- Relates: bug#343351
1a259c
1a259c
* Sun Feb 10 2008 James Antill <james@fedoraproject.org> - 1.0.3-3
1a259c
- Add upstream multilib patch for ustr-import
1a259c
- Resolves: bug#343351
1a259c
1a259c
* Mon Jan 14 2008 James Antill <james@fedoraproject.org> - 1.0.3-2
1a259c
- Build new upstream in Fedora
1a259c
1a259c
* Tue Oct 30 2007 James Antill <james@and.org> - 1.0.2-2
1a259c
- Build new upstream in Fedora
1a259c
1a259c
* Mon Oct 29 2007 James Antill <james@and.org> - 1.0.2-1
1a259c
- New release
1a259c
1a259c
* Tue Aug 28 2007 James Antill <jantill@redhat.com> - 1.0.1-6
1a259c
- Add options for fedora policy brokeness, so it's easy to undo.
1a259c
- Rebuild for buildid.
1a259c
1a259c
* Wed Aug  8 2007 James Antill <james@and.org> - 1.0.1-5
1a259c
- Import fix for ustr-import, wrt. repl <=> replace
1a259c
1a259c
* Sun Aug  5 2007 James Antill <james@and.org> - 1.0.1-4
1a259c
- Patches for minor GIT HEAD documentation fixes.
1a259c
- Install mkdir_p and fgrep examples.
1a259c
1a259c
* Sat Aug  4 2007 James Antill <james@and.org> - 1.0.1-2
1a259c
- First upload to Fedora repos.
1a259c
1a259c
* Fri Aug  3 2007 James Antill <james@and.org> - 1.0.1-0.10.fc7
1a259c
- Re-fix dups in -devel and -debug file lists.
1a259c
- Change license to new format
1a259c
1a259c
* Thu Aug  2 2007 James Antill <james@and.org> - 1.0.1-0.9.fc7
1a259c
- Fix dups in -devel and -debug file lists.
1a259c
1a259c
* Wed Aug  1 2007 James Antill <james@and.org> - 1.0.1-0.8.fc7
1a259c
- Required to make DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS empty
1a259c
- due to so called "review"
1a259c
1a259c
* Fri Jul 27 2007 James Antill <james@and.org> - 1.0.1-0.2.fc7
1a259c
- Next test release of 1.0.1, lots of fixes from Fedora review.
1a259c
1a259c
* Wed Jul 25 2007 James Antill <james@and.org> - 1.0.1-0
1a259c
- Test release of 1.0.1.
1a259c
1a259c
* Wed Jul 11 2007 James Antill <james@and.org> - 1.0.0-1
1a259c
- Upgrade to 1.0.0
1a259c
- Minor fixes on specfile
1a259c
1a259c
* Sun Jun  3 2007 James Antill <james@and.org> - 0.99.2-1
1a259c
- Upgrade to 0.99.2
1a259c
1a259c
* Thu May 24 2007 James Antill <james@and.org> - 0.99.1-2
1a259c
- Fix ver typo to be version.
1a259c
1a259c
* Fri May 18 2007 James Antill <james@and.org> - 0.99.1-1
1a259c
- Use all-shared to get GCC-ish specific shared libs.
1a259c
1a259c
* Mon May 14 2007 James Antill <james@and.org> - 0.98.1-0
1a259c
- Initial spec
1a259c