Accepting request 690893 from devel:libraries:c_c++
- Install pkgconfig into libdir instead of datadir with libyajl-pkgconfig.patch - Use autosetup and cmake_build macro - Rename macro soname to sover OBS-URL: https://build.opensuse.org/request/show/690893 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libyajl?expand=0&rev=22
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
diff -aur lloyd-yajl-66cb08c_orig/src/CMakeLists.txt lloyd-yajl-66cb08c/src/CMakeLists.txt
|
--- a/src/CMakeLists.txt
|
||||||
--- lloyd-yajl-66cb08c_orig/src/CMakeLists.txt 2014-03-19 05:58:29.000000000 +0100
|
+++ b/src/CMakeLists.txt
|
||||||
+++ lloyd-yajl-66cb08c/src/CMakeLists.txt 2014-11-01 11:04:26.327902124 +0100
|
@@ -28,7 +28,7 @@ SET (PUB_HDRS api/yajl_parse.h api/yajl_
|
||||||
@@ -28,7 +28,7 @@
|
|
||||||
ADD_DEFINITIONS(-DYAJL_BUILD)
|
ADD_DEFINITIONS(-DYAJL_BUILD)
|
||||||
|
|
||||||
# set up some paths
|
# set up some paths
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
diff -aur lloyd-yajl-66cb08c_orig/CMakeLists.txt lloyd-yajl-66cb08c/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
--- lloyd-yajl-66cb08c_orig/CMakeLists.txt 2014-03-19 05:58:29.000000000 +0100
|
+++ b/CMakeLists.txt
|
||||||
+++ lloyd-yajl-66cb08c/CMakeLists.txt 2014-11-01 11:03:10.921290296 +0100
|
@@ -59,7 +59,7 @@ ELSE (WIN32)
|
||||||
@@ -59,7 +59,7 @@
|
|
||||||
"${CMAKE_C_FLAGS} -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes")
|
"${CMAKE_C_FLAGS} -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes")
|
||||||
|
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g")
|
SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g")
|
||||||
|
8
libyajl-pkgconfig.patch
Normal file
8
libyajl-pkgconfig.patch
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -84,4 +84,4 @@ INSTALL(TARGETS yajl
|
||||||
|
INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
|
||||||
|
INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)
|
||||||
|
INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl)
|
||||||
|
-INSTALL(FILES ${shareDir}/yajl.pc DESTINATION share/pkgconfig)
|
||||||
|
+INSTALL(FILES ${shareDir}/yajl.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 25 16:58:41 UTC 2019 - olaf@aepfle.de
|
||||||
|
|
||||||
|
- Install pkgconfig into libdir instead of datadir with libyajl-pkgconfig.patch
|
||||||
|
- Use autosetup and cmake_build macro
|
||||||
|
- Rename macro soname to sover
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 27 11:44:33 CEST 2018 - kukuk@suse.de
|
Tue Mar 27 11:44:33 CEST 2018 - kukuk@suse.de
|
||||||
|
|
||||||
|
29
libyajl.spec
29
libyajl.spec
@@ -16,7 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define soname 2
|
%define sover 2
|
||||||
Name: libyajl
|
Name: libyajl
|
||||||
Version: 2.1.0
|
Version: 2.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -31,6 +31,7 @@ Source3: json_verify.1
|
|||||||
Source99: %{name}-rpmlintrc
|
Source99: %{name}-rpmlintrc
|
||||||
Patch1: libyajl-optflags.patch
|
Patch1: libyajl-optflags.patch
|
||||||
Patch2: libyajl-lib_suffix.patch
|
Patch2: libyajl-lib_suffix.patch
|
||||||
|
Patch3: libyajl-pkgconfig.patch
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
@@ -43,18 +44,18 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
||||||
small validating JSON generator.
|
small validating JSON generator.
|
||||||
|
|
||||||
%package -n %{name}%{soname}
|
%package -n %{name}%{sover}
|
||||||
Summary: Yet Another JSON Library
|
Summary: Yet Another JSON Library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
|
||||||
%description -n %{name}%{soname}
|
%description -n %{name}%{sover}
|
||||||
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
||||||
small validating JSON generator.
|
small validating JSON generator.
|
||||||
|
|
||||||
%package -n %{name}-devel
|
%package -n %{name}-devel
|
||||||
Summary: Yet Another JSON Library (Development Environment)
|
Summary: Yet Another JSON Library (Development Environment)
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{name}%{soname} = %{version}
|
Requires: %{name}%{sover} = %{version}
|
||||||
|
|
||||||
%description -n %{name}-devel
|
%description -n %{name}-devel
|
||||||
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
||||||
@@ -78,7 +79,7 @@ against %{name}.
|
|||||||
%package -n yajl
|
%package -n yajl
|
||||||
Summary: Yet Another JSON Library Tools
|
Summary: Yet Another JSON Library Tools
|
||||||
Group: Productivity/Text/Utilities
|
Group: Productivity/Text/Utilities
|
||||||
Requires: %{name}%{soname} = %{version}
|
Requires: %{name}%{sover} = %{version}
|
||||||
|
|
||||||
%description -n yajl
|
%description -n yajl
|
||||||
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
|
||||||
@@ -87,13 +88,11 @@ small validating JSON generator.
|
|||||||
This package provides a few command-line utilities for processing JSON files.
|
This package provides a few command-line utilities for processing JSON files.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n yajl-%{version}
|
%autosetup -p1 -n yajl-%{version}
|
||||||
%patch1 -p1 -b .optflags
|
|
||||||
%patch2 -p1 -b .lib_suffix
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake
|
%cmake
|
||||||
make %{?_smp_mflags}
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
@@ -103,22 +102,22 @@ install -m644 %{SOURCE2} %{SOURCE3} %{buildroot}/%{_mandir}/man1
|
|||||||
%check
|
%check
|
||||||
make %{?_smp_mflags} test
|
make %{?_smp_mflags} test
|
||||||
|
|
||||||
%post -n %{name}%{soname} -p /sbin/ldconfig
|
%post -n %{name}%{sover} -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n %{name}%{soname} -p /sbin/ldconfig
|
%postun -n %{name}%{sover} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -n %{name}%{soname}
|
%files -n %{name}%{sover}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_libdir}/libyajl.so.%{soname}
|
%{_libdir}/libyajl.so.%{sover}
|
||||||
%{_libdir}/libyajl.so.%{soname}.*
|
%{_libdir}/libyajl.so.%{sover}.*
|
||||||
|
|
||||||
%files -n %{name}-devel
|
%files -n %{name}-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README TODO
|
%doc README TODO
|
||||||
%{_includedir}/yajl
|
%{_includedir}/yajl
|
||||||
%{_libdir}/libyajl.so
|
%{_libdir}/libyajl.so
|
||||||
%{_datadir}/pkgconfig/yajl.pc
|
%{_libdir}/pkgconfig/yajl.pc
|
||||||
|
|
||||||
%files -n %{name}-devel-static
|
%files -n %{name}-devel-static
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Reference in New Issue
Block a user