c1f15a2
c333501
%define show_all_cmds       1
e0d1e36
%define broken_fed_dbg_opts 0
f474fa5
%define multilib_inst       1
8b16988
8b16988
%if %{show_all_cmds}
8b16988
%define policy_cflags_hide HIDE=
8b16988
%else
8b16988
%define policy_cflags_hide %{nil}
8b16988
%endif
8b16988
8b16988
%if %{broken_fed_dbg_opts}
8b16988
# Variable name explains itself.
8b16988
%define policy_cflags_broken DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=
8b16988
%else
8b16988
%define policy_cflags_broken %{nil}
8b16988
%endif
8b16988
8b16988
%define policy_cflags %{policy_cflags_hide}  %{policy_cflags_broken}
8b16988
f474fa5
%if %{multilib_inst}
f474fa5
%define ustr_make_install install-multilib-linux
f474fa5
%else
f474fa5
%define ustr_make_install install
f474fa5
%endif
f474fa5
f474fa5
c1f15a2
Name: ustr
7e1d1cf
Version: 1.0.4
c11b6f0
Release: 26%{?dist}
c1f15a2
Summary: String library, very low memory overhead, simple to import
c1f15a2
Group: System Environment/Libraries
c1f15a2
License: MIT or LGPLv2+ or BSD
c1f15a2
URL: http://www.and.org/ustr/
6352a91
Source0: http://www.and.org/ustr/%{version}/%{name}-%{version}.tar.bz2
2f20f90
Patch0: c99-inline.patch
c1f15a2
# BuildRequires: make gcc sed
c1f15a2
c1f15a2
%description
c1f15a2
 Micro string library, very low overhead from plain strdup() (Ave. 44% for
c1f15a2
0-20B strings). Very easy to use in existing C code. At it's simplest you can
c1f15a2
just include a single header file into your .c and start using it.
c1f15a2
 This package also distributes pre-built shared libraries.
c1f15a2
c1f15a2
%package devel
c1f15a2
Summary: Development files for %{name}
c1f15a2
Group: Development/Libraries
c1f15a2
# This isn't required, but Fedora policy makes it so
c1f15a2
Requires: pkgconfig >= 0.14
c1f15a2
Requires: %{name} = %{version}-%{release}
c1f15a2
c1f15a2
%description devel
c1f15a2
 Header files for the Ustr string library, and the .so to link with.
c1f15a2
 Also includes a %{name}.pc file for pkg-config usage.
c1f15a2
 Includes the ustr-import tool, for if you jsut want to include
c1f15a2
the code in your projects ... you don't have to link to the shared lib.
c1f15a2
c1f15a2
%package static
c1f15a2
Summary: Static development files for %{name}
c1f15a2
Group: Development/Libraries
c1f15a2
Requires: %{name}-devel = %{version}-%{release}
c1f15a2
c1f15a2
%description static
c1f15a2
 Static library for the Ustr string library.
c1f15a2
c1f15a2
%package debug
c1f15a2
Summary: Development files for %{name}, with debugging options turned on
c1f15a2
Group: Development/Libraries
c1f15a2
# This isn't required, but Fedora policy makes it so
c1f15a2
Requires: pkgconfig >= 0.14
c1f15a2
Requires: %{name}-devel = %{version}-%{release}
c1f15a2
c1f15a2
%description debug
c1f15a2
 Header files and dynamic libraries for a debug build of the Ustr string
c1f15a2
library.
c1f15a2
 Also includes a %{name}-debug.pc file for pkg-config usage.
c1f15a2
c1f15a2
%package debug-static
c1f15a2
Summary: Static development files for %{name}, with debugging options turned on
c1f15a2
Group: Development/Libraries
c1f15a2
Requires: %{name}-debug = %{version}-%{release}
c1f15a2
c1f15a2
%description debug-static
c1f15a2
 Static library for the debug build of the Ustr string library.
c1f15a2
c1f15a2
%prep
c1f15a2
%setup -q
2f20f90
%patch0 -p1
c1f15a2
c1f15a2
%build
c11b6f0
make %{?_smp_mflags} all-shared CFLAGS="${CFLAGS:-%optflags}  -fgnu89-inline" \
c11b6f0
  LDFLAGS="$RPM_LD_FLAGS" %{policy_cflags}
c1f15a2
c1f15a2
%check
c1f15a2
%if %{?chk}%{!?chk:1}
c11b6f0
make %{?_smp_mflags} check CFLAGS="${CFLAGS:-%optflags}  -fgnu89-inline"
c11b6f0
  LDFLAGS="$RPM_LD_FLAGS" %{policy_cflags}
c1f15a2
%endif
c1f15a2
c1f15a2
%install
c1f15a2
rm -rf $RPM_BUILD_ROOT
f474fa5
make $@ %{ustr_make_install} prefix=%{_prefix} \
c1f15a2
                bindir=%{_bindir}         mandir=%{_mandir} \
c1f15a2
                datadir=%{_datadir}       libdir=%{_libdir} \
f474fa5
                includedir=%{_includedir} libexecdir=%{_libexecdir} \
James Antill f745836
                DOCSHRDIR=%{_datadir}/doc/ustr-devel \
c1f15a2
                DESTDIR=$RPM_BUILD_ROOT LDCONFIG=/bin/true HIDE=
c1f15a2
c1f15a2
%post -p /sbin/ldconfig
c1f15a2
c1f15a2
%postun -p /sbin/ldconfig
c1f15a2
c1f15a2
%post debug -p /sbin/ldconfig
c1f15a2
c1f15a2
%postun debug -p /sbin/ldconfig
c1f15a2
c1f15a2
%files
c1f15a2
%defattr(-,root,root,-)
c1f15a2
%{_libdir}/libustr-1.0.so.*
39675d8
%{!?_licensedir:%global license %%doc}
39675d8
%license LICENSE*
39675d8
%doc ChangeLog README NEWS
c1f15a2
c1f15a2
%files devel
c1f15a2
%defattr(-,root,root,-)
c1f15a2
%{_datadir}/ustr-%{version}
c1f15a2
%{_bindir}/ustr-import
f474fa5
%if %{multilib_inst}
976b9f3
%{_libexecdir}/ustr-%{version}
f474fa5
%endif
c1f15a2
%{_includedir}/ustr.h
c1f15a2
%{_includedir}/ustr-*.h
f474fa5
%exclude %{_includedir}/ustr*debug*.h
c1f15a2
%{_libdir}/pkgconfig/ustr.pc
c1f15a2
%{_libdir}/libustr.so
James Antill f745836
%{_datadir}/doc/ustr-devel
c1f15a2
%{_mandir}/man1/*
c1f15a2
%{_mandir}/man3/*
c1f15a2
c1f15a2
%files static
c1f15a2
%{_libdir}/libustr.a
c1f15a2
c1f15a2
%files debug
c1f15a2
%defattr(-,root,root,-)
c1f15a2
%{_libdir}/libustr-debug-1.0.so.*
c1f15a2
%{_libdir}/libustr-debug.so
f474fa5
%{_includedir}/ustr*debug*.h
c1f15a2
%{_libdir}/pkgconfig/ustr-debug.pc
c1f15a2
c1f15a2
%files debug-static
c1f15a2
%{_libdir}/libustr-debug.a
c1f15a2
c1f15a2
c1f15a2
%changelog
c11b6f0
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 1.0.4-26
c11b6f0
- Use LDFLAGS from redhat-rpm-config
c11b6f0
69a96d3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-25
69a96d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
69a96d3
c59a337
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-24
c59a337
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c59a337
4dbb6d3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-23
4dbb6d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4dbb6d3
18c0ac4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-22
18c0ac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
18c0ac4
6df9573
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-21
6df9573
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6df9573
James Antill d952024
* Fri Oct 30 2015 James Antill <james@fedoraproject.org> - 1.0.4-20
James Antill f745836
- Move doc/ustr-devel-<version> to doc/ustr-devel. BZ 993940.
James Antill d952024
- Use -fgnu89-inline workaround for gcc5.
James Antill f745836
e6aa484
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-19
e6aa484
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e6aa484
4560a7e
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-18
4560a7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4560a7e
39675d8
* Wed Aug  6 2014 Tom Callaway <spot@fedoraproject.org> - 1.0.4-17
39675d8
- fix license handling
39675d8
6c30971
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-16
6c30971
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6c30971
07e4d64
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-15
07e4d64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
07e4d64
7ce8fb6
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-14
7ce8fb6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7ce8fb6
012ec49
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-13
012ec49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
012ec49
86c493e
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-12
86c493e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
86c493e
729a273
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-11
729a273
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
729a273
6352a91
* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 1.0.4-10
6352a91
- Use bzipped upstream tarball.
6352a91
0b6d20c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-9
0b6d20c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0b6d20c
728ea36
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-8
728ea36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
728ea36
2f20f90
* Fri Jun 13 2008 James Antill <james@fedoraproject.org> - 1.0.4-7
2f20f90
- Fix c99 inline problems, newer GCC
2f20f90
976b9f3
* Sun Mar  9 2008 James Antill <james@fedoraproject.org> - 1.0.4-6
976b9f3
- Fix dir. ownership bug.
976b9f3
- Resolves: rhbz#436711
976b9f3
9f272f5
* Wed Mar  5 2008 James Antill <james@fedoraproject.org> - 1.0.4-5
9f272f5
- New new upstream: 1.0.4
7e1d1cf
e0d1e36
* Thu Feb 21 2008 Dennis Gilmore <dennis@ausil.us> - 1.0.3-5
e0d1e36
- set broken_fed_dbg_opts to 0 its the recomended option upstream
9f272f5
- this works around sparc GCC problems
e0d1e36
- add smpflags and cflags to make check
e0d1e36
3f54622
* Wed Feb 13 2008 James Antill <james@fedoraproject.org> - 1.0.3-4
3f54622
- Preserve timestamps for shared multilib. files.
3f54622
- Relates: bug#343351
3f54622
e2be88e
* Sun Feb 10 2008 James Antill <james@fedoraproject.org> - 1.0.3-3
e2be88e
- Add upstream multilib patch for ustr-import
e2be88e
- Resolves: bug#343351
e2be88e
9f77851
* Mon Jan 14 2008 James Antill <james@fedoraproject.org> - 1.0.3-2
9f77851
- Build new upstream in Fedora
9f77851
b23c755
* Tue Oct 30 2007 James Antill <james@and.org> - 1.0.2-2
b23c755
- Build new upstream in Fedora
b23c755
b23c755
* Mon Oct 29 2007 James Antill <james@and.org> - 1.0.2-1
b23c755
- New release
b23c755
8b16988
* Tue Aug 28 2007 James Antill <jantill@redhat.com> - 1.0.1-6
8b16988
- Add options for fedora policy brokeness, so it's easy to undo.
8b16988
- Rebuild for buildid.
8b16988
04eb821
* Wed Aug  8 2007 James Antill <james@and.org> - 1.0.1-5
04eb821
- Import fix for ustr-import, wrt. repl <=> replace
04eb821
439f0e1
* Sun Aug  5 2007 James Antill <james@and.org> - 1.0.1-4
34533a4
- Patches for minor GIT HEAD documentation fixes.
34533a4
- Install mkdir_p and fgrep examples.
34533a4
c1f15a2
* Sat Aug  4 2007 James Antill <james@and.org> - 1.0.1-2
c1f15a2
- First upload to Fedora repos.
c1f15a2
c1f15a2
* Fri Aug  3 2007 James Antill <james@and.org> - 1.0.1-0.10.fc7
c1f15a2
- Re-fix dups in -devel and -debug file lists.
c1f15a2
- Change license to new format
c1f15a2
c1f15a2
* Thu Aug  2 2007 James Antill <james@and.org> - 1.0.1-0.9.fc7
c1f15a2
- Fix dups in -devel and -debug file lists.
c1f15a2
c1f15a2
* Wed Aug  1 2007 James Antill <james@and.org> - 1.0.1-0.8.fc7
c1f15a2
- Required to make DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS empty
c1f15a2
- due to so called "review"
c1f15a2
c1f15a2
* Fri Jul 27 2007 James Antill <james@and.org> - 1.0.1-0.2.fc7
c1f15a2
- Next test release of 1.0.1, lots of fixes from Fedora review.
c1f15a2
c1f15a2
* Wed Jul 25 2007 James Antill <james@and.org> - 1.0.1-0
c1f15a2
- Test release of 1.0.1.
c1f15a2
c1f15a2
* Wed Jul 11 2007 James Antill <james@and.org> - 1.0.0-1
c1f15a2
- Upgrade to 1.0.0
c1f15a2
- Minor fixes on specfile
c1f15a2
c1f15a2
* Sun Jun  3 2007 James Antill <james@and.org> - 0.99.2-1
c1f15a2
- Upgrade to 0.99.2
c1f15a2
c1f15a2
* Thu May 24 2007 James Antill <james@and.org> - 0.99.1-2
c1f15a2
- Fix ver typo to be version.
c1f15a2
c1f15a2
* Fri May 18 2007 James Antill <james@and.org> - 0.99.1-1
c1f15a2
- Use all-shared to get GCC-ish specific shared libs.
c1f15a2
c1f15a2
* Mon May 14 2007 James Antill <james@and.org> - 0.98.1-0
c1f15a2
- Initial spec
c1f15a2