]> git.pld-linux.org Git - packages/linenoise.git/blob - linenoise.spec
pass cflags thorugh environment so -fpic always gets appended
[packages/linenoise.git] / linenoise.spec
1 %define git_rev 7946e2c
2 %define rel     3
3 Summary:        Minimal replacement for readline
4 Name:           linenoise
5 Version:        0
6 Release:        0.git%{git_rev}.%{rel}
7 # The licenses are a bit of a mess here...
8 # utf8.{c,h} contain incomplete license headers. They refer to a "LICENSE" file
9 # which is actually from jimtcl. A copy is committed in dist-git as
10 # jimtcl-LICENSE, retrieved from
11 # <https://raw.github.com/msteveb/jimtcl/master/LICENSE>. I received a mail
12 # from the author, committed as steve-bennett-license-confirmation, confirming
13 # that that is indeed the LICENSE file referred to and therefore utf8.{c,h} are
14 # under a BSD-like license.
15 # linenoise.{c,h} contain complete BSD-like license headers so they are fine.
16 # And it means the whole library is definitely under a BSD-like license.
17 # But there is no separate license file shipped in the tarball. I queried Tad
18 # Marshall on 2013-01-10 to include one but never received a reply. So
19 # I synthesized one as Source1.
20 License:        BSD
21 Group:          Libraries
22 Source0:        https://github.com/tadmarshall/linenoise/tarball/%{git_rev}/%{name}-%{git_rev}.tar.gz
23 # Source0-md5:  7cb42d58db11bf3c33b8dd698ec92754
24 Patch0:         %{name}-build-shared-lib.patch
25 Patch1:         %{name}-symbol-visibility.patch
26 URL:            https://github.com/tadmarshall/linenoise
27 BuildRequires:  libstdc++-devel
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Linenoise is a replacement for the readline line-editing library with
32 the goal of being smaller.
33
34 %package devel
35 Summary:        Development files for %{name}
36 Requires:       %{name} = %{version}-%{release}
37
38 %description devel
39 This package contains files needed for developing software that uses
40 %{name}.
41
42 %prep
43 %setup -q -n tadmarshall-%{name}-%{git_rev}
44 %patch0 -p1
45 %patch1 -p1
46
47 %build
48 export CFLAGS="%{rpmcflags}"
49 %{__make} \
50         CC="%{__cc}" \
51         LIBDIR="%{_libdir}" \
52         INCLUDEDIR="%{_includedir}"
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 export CFLAGS="%{rpmcflags}"
57 %{__make} install \
58         LIBDIR="%{_libdir}" \
59         INCLUDEDIR="%{_includedir}" \
60         DESTDIR=$RPM_BUILD_ROOT
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post   -p /sbin/ldconfig
66 %postun -p /sbin/ldconfig
67
68 %files
69 %defattr(644,root,root,755)
70 %doc README.markdown
71 %attr(755,root,root) %{_libdir}/liblinenoise.so.*.*
72 %attr(755,root,root) %ghost %{_libdir}/liblinenoise.so.0
73
74 %files devel
75 %defattr(644,root,root,755)
76 %{_includedir}/linenoise.h
77 %{_libdir}/liblinenoise.so
This page took 0.131423 seconds and 3 git commands to generate.