diff --git a/libfastjson.spec b/libfastjson.spec index bdd6b1ea782b8a320f8f22ab84574d5dfca21827..cbf8aaaf8fefeb26d835a013b55692bf505896b2 100644 --- a/libfastjson.spec +++ b/libfastjson.spec @@ -1,29 +1,21 @@ -%define anolis_release 3 -Name: libfastjson -Version: 0.99.9 -Release: %{anolis_release}%{?dist} -Summary: A JSON implementation in C -License: MIT -URL: https://github.com/rsyslog/libfastjson -Source0: http://download.rsyslog.com/libfastjson/libfastjson-%{version}.tar.gz - -BuildRequires: autoconf automake libtool -BuildRequires: make +%define anolis_release 4 -%description -LIBFASTJSON implements a reference counting object -model that allows you to easily construct JSON -objects in C, output them as JSON formatted strings -and parse JSON formatted strings back into the -C representation of JSON objects. +Name: libfastjson +Version: 0.99.9 +Release: %{anolis_release}%{?dist} +Summary: A JSON implementation in C +License: MIT +URL: https://github.com/rsyslog/libfastjson +Source0: http://download.rsyslog.com/libfastjson/libfastjson-%{version}.tar.gz -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch +BuildRequires: gcc gcc-c++ autoconf automake libtool make -%description doc -The %{name}-doc package contains documentation files for %{name}. +%description +libfastjson is a fork from json-c, and is currently under development. +The aim of this project is not to provide a slightly modified clone of json-c. It's aim is to provide: + 1. a small library with essential json handling functions + 2. sufficiently good json support (not 100% standards compliant) + 3. be very fast in processing %package devel Summary: Development files for libfastjson @@ -33,48 +25,62 @@ Requires: %{name} = %{version}-%{release} This package contains libraries and header files for developing applications that use libfastjson. +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +The libfastjson-doc package contains documentation files for libfastjson. + + %prep -%setup -q +%autosetup -n %{name}-%{version} -p1 -for doc in ChangeLog; do - iconv -f iso-8859-1 -t utf8 $doc > $doc.new && - touch -r $doc $doc.new && - mv $doc.new $doc +for doc in ChangeLog +do + iconv -f iso-8859-1 -t utf8 $doc > $doc.new && + touch -r $doc $doc.new && + mv $doc.new $doc done %build autoreconf -iv -export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" # temporary workaround for EPEL5, fixed upstream +export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" %configure --enable-shared --disable-static %install -make V=1 DESTDIR=%{buildroot} install +%make_install find %{buildroot} -name '*.la' -delete -print +%generate_compatibility_deps -%check -make V=1 check -%ldconfig_scriptlets +%check +make check -%generate_compatibility_deps %files -%{!?_licensedir:%global license %%doc} -%license COPYING %dir %{abidir} %{_libdir}/libfastjson.so.* +%{!?_licensedir:%global license %%doc} +%license COPYING %{abidir}/libfastjson.dump -%files doc -%doc AUTHORS ChangeLog README.html - %files devel -%{_includedir}/libfastjson %{_libdir}/libfastjson.so %{_libdir}/pkgconfig/libfastjson.pc +%{_includedir}/libfastjson + + +%files doc +%doc README.html ChangeLog AUTHORS + %changelog +* Thu Apr 13 2023 chen_yu_ao - 0.00.9-4 +- change spec file formats + * Wed Feb 15 2023 Ziyang Zhang - 0.99.9-3 - add abi/api files