]> git.pld-linux.org Git - packages/linenoise.git/blob - linenoise.spec
a4041df3aa43304975f1f226a81ca6f079211715
[packages/linenoise.git] / linenoise.spec
1
2 %define git_rev 7946e2c
3
4 Summary:        Minimal replacement for readline
5 Name:           linenoise
6 Version:        0
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.
21 License:        BSD
22 Group:          Libraries
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
28
29 %package devel
30 Summary:        Development files for %{name}
31 Requires:       %{name}%{?_isa} = %{version}-%{release}
32
33 %description
34 Linenoise is a replacement for the readline line-editing library with
35 the goal of being smaller.
36
37 %description devel
38 This package contains files needed for developing software that uses
39 %{name}.
40
41 %prep
42 %setup -q -n tadmarshall-%{name}-%{git_rev}
43
44 sed -i -e 's#ldconfig.*##g' Makefile
45
46 %patch0 -p1
47 %patch1 -p1
48
49 %build
50 %{__make} \
51         CC="%{__cc}" \
52         LIBDIR="%{_libdir}" \
53         INCLUDEDIR="%{_includedir}" \
54         CFLAGS="%{rpmcflags}"
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58
59 %{__make} install \
60         LIBDIR="%{_libdir}" \
61         INCLUDEDIR="%{_includedir}" \
62         CFLAGS="%{rpmcflags}" \
63         DESTDIR="$RPM_BUILD_ROOT"
64
65 %files
66 %defattr(644,root,root,755)
67 %doc README.markdown
68 %attr(755,root,root) %{_libdir}/liblinenoise.so.*.*
69 %attr(755,root,root) %ghost %{_libdir}/liblinenoise.so.0
70
71 %files devel
72 %defattr(644,root,root,755)
73 %{_includedir}/linenoise.h
74 %{_libdir}/liblinenoise.so
75
76 %post -p /sbin/ldconfig
77 %postun -p /sbin/ldconfig
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
This page took 0.059736 seconds and 2 git commands to generate.