Update to new upstream release
Introduces SONAME bump, that should have been in 0.12 already Unify %%doc General spec-file cleanup
This commit is contained in:
parent
fdf4b42349
commit
301e4e679a
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ json-c.spec~
|
|||||||
clog
|
clog
|
||||||
/json-c-0.11-20130402.tar.gz
|
/json-c-0.11-20130402.tar.gz
|
||||||
/json-c-0.12-20140410.tar.gz
|
/json-c-0.12-20140410.tar.gz
|
||||||
|
/json-c-0.12.1-20160607.tar.gz
|
||||||
|
132
json-c.spec
132
json-c.spec
@ -1,93 +1,131 @@
|
|||||||
%global reldate 20140410
|
%global reldate 20160607
|
||||||
|
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
Name: json-c
|
|
||||||
Version: 0.12
|
Name: json-c
|
||||||
Release: 8%{?dist}
|
Version: 0.12.1
|
||||||
Summary: A JSON implementation in C
|
Release: 1%{?dist}
|
||||||
License: MIT
|
Summary: JSON implementation in C
|
||||||
URL: https://github.com/json-c/json-c/wiki
|
|
||||||
Source0: https://github.com/json-c/json-c/archive/json-c-%{version}-%{reldate}.tar.gz
|
License: MIT
|
||||||
BuildRequires: autoconf
|
URL: https://github.com/%{name}/%{name}
|
||||||
BuildRequires: automake
|
Source0: %{url}/archive/json-c-%{version}-%{reldate}.tar.gz
|
||||||
BuildRequires: libtool
|
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: libtool
|
||||||
|
|
||||||
%description
|
%description
|
||||||
JSON-C implements a reference counting object model that allows you to easily
|
JSON-C implements a reference counting object model that allows you
|
||||||
construct JSON objects in C, output them as JSON formatted strings and parse
|
to easily construct JSON objects in C, output them as JSON formatted
|
||||||
JSON formatted strings back into the C representation of JSON objects.
|
strings and parse JSON formatted strings back into the C representation
|
||||||
|
of JSON objects. It aims to conform to RFC 7159.
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Development files for %{name}
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
|
||||||
|
Requires: %{name}%{?_isa} == %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
This package contains libraries and header files for
|
This package contains libraries and header files for
|
||||||
developing applications that use %{name}.
|
developing applications that use %{name}.
|
||||||
|
|
||||||
%package doc
|
|
||||||
Summary: Reference manual for json-c
|
|
||||||
%if 0%{?fedora} > 10 || 0%{?rhel} > 5
|
|
||||||
BuildArch: noarch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description doc
|
%package doc
|
||||||
|
Summary: Reference manual for json-c
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: hardlink
|
||||||
|
|
||||||
|
%description doc
|
||||||
This package contains the reference manual for json-c.
|
This package contains the reference manual for json-c.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn json-c-json-c-%{version}-%{reldate}
|
%autosetup -n %{name}-%{name}-%{version}-%{reldate}
|
||||||
# Get rid of maintainer mode cflags.
|
|
||||||
sed -i 's|-Werror ||g' Makefile.am.inc
|
|
||||||
# Postponed.
|
|
||||||
# Bump the soname manually.
|
|
||||||
# sed -i 's#2:1:0#3:0:0#' Makefile.am
|
|
||||||
|
|
||||||
for doc in ChangeLog; do
|
for doc in ChangeLog; do
|
||||||
iconv -f iso-8859-1 -t utf8 $doc > $doc.new &&
|
%{_bindir}/iconv -f iso-8859-1 -t utf8 ${doc} > ${doc}.new
|
||||||
touch -r $doc $doc.new &&
|
/bin/touch -r ${doc} ${doc}.new
|
||||||
mv $doc.new $doc
|
%{__mv} -f ${doc}.new ${doc}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
%{__sed} -i 's|-Werror ||g' Makefile.am.inc
|
||||||
|
%{_bindir}/autoreconf -fiv
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Get rid of rpath.
|
%configure \
|
||||||
autoreconf -fiv
|
--disable-rpath \
|
||||||
%configure --enable-shared --disable-static --disable-rpath --enable-rdrand
|
--disable-silent-rules \
|
||||||
|
--disable-static \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-rdrand
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
|
%{_bindir}/doxygen Doxyfile
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
%{_bindir}/find %{buildroot} -name '*.la' -delete -print
|
||||||
|
|
||||||
|
%{__mkdir} -p %{buildroot}/%{_pkgdocdir}
|
||||||
|
%{__cp} -pr doc/html ChangeLog README README.* %{buildroot}/%{_pkgdocdir}
|
||||||
|
%{_sbindir}/hardlink -cvf %{buildroot}/%{_pkgdocdir}
|
||||||
|
|
||||||
# Get rid of la files
|
|
||||||
find %{buildroot} -name '*.la' -delete -print
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
%make_build check
|
||||||
|
|
||||||
|
|
||||||
%pretrans devel -p <lua>
|
%pretrans devel -p <lua>
|
||||||
path = "%{_includedir}/json-c"
|
path = "%{_includedir}/%{name}"
|
||||||
st = posix.stat(path)
|
st = posix.stat(path)
|
||||||
if st and st.type == "link" then
|
if st and st.type == "link" then
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{!?_licensedir:%global license %%doc}
|
%doc %dir %{_pkgdocdir}
|
||||||
|
%license AUTHORS
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_libdir}/libjson-c.so.*
|
%{_libdir}/lib%{name}.so.*
|
||||||
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc AUTHORS ChangeLog README README.html
|
%doc %dir %{_pkgdocdir}
|
||||||
%{_includedir}/json-c/
|
%doc %{_pkgdocdir}/ChangeLog
|
||||||
%{_libdir}/libjson-c.so
|
%doc %{_pkgdocdir}/README*
|
||||||
%{_libdir}/pkgconfig/json-c.pc
|
%{_includedir}/%{name}/
|
||||||
|
%{_libdir}/lib%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/html/*
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
%license %{_datadir}/licenses/%{name}*
|
||||||
|
%endif # 0%%{?fedora} || 0%%{?rhel} >= 7
|
||||||
|
%doc %{_pkgdocdir}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 27 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-1
|
||||||
|
- Update to new upstream release
|
||||||
|
- Introduces SONAME bump, that should have been in 0.12 already
|
||||||
|
- Unify %%doc
|
||||||
|
- General spec-file cleanup
|
||||||
|
|
||||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-8
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user