2 %define git_rev 7946e2c
4 Summary: Minimal replacement for readline
7 Release: 0.git%{git_rev}.1
8 # The licenses are a bit of a mess here...
9 # utf8.{c,h} contain incomplete license headers. They refer to a "LICENSE" file
10 # which is actually from jimtcl. A copy is committed in dist-git as
11 # jimtcl-LICENSE, retrieved from
12 # <https://raw.github.com/msteveb/jimtcl/master/LICENSE>. I received a mail
13 # from the author, committed as steve-bennett-license-confirmation, confirming
14 # that that is indeed the LICENSE file referred to and therefore utf8.{c,h} are
15 # under a BSD-like license.
16 # linenoise.{c,h} contain complete BSD-like license headers so they are fine.
17 # And it means the whole library is definitely under a BSD-like license.
18 # But there is no separate license file shipped in the tarball. I queried Tad
19 # Marshall on 2013-01-10 to include one but never received a reply. So
20 # I synthesized one as Source1.
23 URL: https://github.com/tadmarshall/linenoise
24 Source0: https://github.com/tadmarshall/linenoise/tarball/%{git_rev}/%{name}-%{git_rev}.tar.gz
25 # Source0-md5: 7cb42d58db11bf3c33b8dd698ec92754
26 Patch0: %{name}-build-shared-lib.patch
27 Patch1: %{name}-symbol-visibility.patch
30 Summary: Development files for %{name}
31 Requires: %{name}%{?_isa} = %{version}-%{release}
34 Linenoise is a replacement for the readline line-editing library with
35 the goal of being smaller.
38 This package contains files needed for developing software that uses
42 %setup -q -n tadmarshall-%{name}-%{git_rev}
44 sed -i -e 's#ldconfig.*##g' Makefile
53 INCLUDEDIR="%{_includedir}" \
57 rm -rf $RPM_BUILD_ROOT
61 INCLUDEDIR="%{_includedir}" \
62 CFLAGS="%{rpmcflags}" \
63 DESTDIR="$RPM_BUILD_ROOT"
66 %defattr(644,root,root,755)
68 %attr(755,root,root) %{_libdir}/liblinenoise.so.*.*
69 %attr(755,root,root) %ghost %{_libdir}/liblinenoise.so.0
72 %defattr(644,root,root,755)
73 %{_includedir}/linenoise.h
74 %{_libdir}/liblinenoise.so
76 %post -p /sbin/ldconfig
77 %postun -p /sbin/ldconfig
80 rm -rf $RPM_BUILD_ROOT