]> git.pld-linux.org Git - packages/log4cxx.git/blobdiff - log4cxx.spec
- updated to 1.1.0
[packages/log4cxx.git] / log4cxx.spec
index 7308fb4564ec01b646557172f61de48c2f711dc8..a8064a386423fce85564c7d3e14892ce699bc5f8 100644 (file)
@@ -1,16 +1,31 @@
+#
+# Conditional build:
+%bcond_without libesmtp        # (E)SMTP support via libesmtp
+%bcond_without qt              # Qt support library
+
 Summary:       Log4cxx - a port to C++ of the log4j project
 Summary(pl.UTF-8):     Log4cxx - port projektu log4j dla C++
 Name:          log4cxx
-Version:       0.10.0
-Release:       0.3
+Version:       1.1.0
+Release:       1
 License:       Apache v2.0
 Group:         Libraries
-Source0:       http://www.apache.org/dist/logging/log4cxx/0.10.0/apache-%{name}-%{version}.tar.gz
-# Source0-md5: b30ffb8da3665178e68940ff7a61084c
-Patch0:                %{name}-gcc43.patch
+Source0:       https://downloads.apache.org/logging/log4cxx/%{version}/apache-%{name}-%{version}.tar.gz
+# Source0-md5: 50b76cadf829152371011d2db38351b2
 URL:           http://logging.apache.org/log4cxx/
-BuildRequires: apr-util-devel
-BuildRequires: libstdc++-devel
+%{?with_qt:BuildRequires:      Qt5Core-devel >= 5}
+BuildRequires: apr-devel >= 1
+BuildRequires: apr-util-devel >= 1
+BuildRequires: boost-devel
+BuildRequires: cmake >= 3.13
+# for tests
+BuildRequires: expat-devel >= 1.95
+%{?with_libesmtp:BuildRequires:        libesmtp-devel}
+BuildRequires: libfmt-devel >= 7.1
+BuildRequires: libstdc++-devel >= 6:7
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: unixODBC-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -20,17 +35,19 @@ configuration and output formats.
 
 %description -l pl.UTF-8
 Log4cxx jest portem Log4j dla C++. Log4cxx próbuje naśladować
-użytkowanie log4j tak bardzo na ile pozwala na to język oraz
-próbuje być kompatybilnym z plikami konfiguracyjnymi i formatami
-wyjściowymi log4j.
+użytkowanie log4j tak bardzo na ile pozwala na to język oraz próbuje
+być kompatybilnym z plikami konfiguracyjnymi i formatami wyjściowymi
+log4j.
 
 %package devel
 Summary:       Header files for log4cxx library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki log4cxx
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      apr-util-devel
-Requires:      libstdc++-devel
+Requires:      apr-devel >= 1
+Requires:      apr-util-devel >= 1
+Requires:      libstdc++-devel >= 6:7
+Obsoletes:     log4cxx-static < 1
 
 %description devel
 This is the package containing the header files for log4cxx library.
@@ -38,52 +55,79 @@ This is the package containing the header files for log4cxx library.
 %description devel -l pl.UTF-8
 Ten pakiet zawiera pliki nagłówkowe biblioteki log4cxx.
 
-%package static
-Summary:       Static log4cxx library
-Summary(pl.UTF-8):     Statyczna biblioteka log4cxx
+%package qt
+Summary:       Qt support library for log4cxx C++ logging framework
+Summary(pl.UTF-8):     Biblioteka wsparcia Qt do szkieletu logującego C++ log4cxx
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description qt
+Qt support library for log4cxx C++ logging framework.
+
+%description qt -l pl.UTF-8
+Biblioteka wsparcia Qt do szkieletu logującego C++ log4cxx.
+
+%package qt-devel
+Summary:       Header files for log4cxx Qt library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki log4cxx Qt
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-qt = %{version}-%{release}
+Requires:      Qt5Core-devel >= 5
 
-%description static
-Static log4cxx library.
+%description qt-devel
+Header files for log4cxx Qt library.
 
-%description static -l pl.UTF-8
-Statyczna biblioteka log4cxx.
+%description qt-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki log4cxx Qt.
 
 %prep
 %setup -q -n apache-%{name}-%{version}
-%patch0 -p1
 
 %build
-%configure
-%{__make}
+%cmake -B build \
+       -DCMAKE_INSTALL_INCLUDEDIR=include \
+       -DCMAKE_INSTALL_LIBDIR=%{_lib} \
+       %{!?with_libesmtp:-DHAS_LIBESMTP=OFF} \
+       %{?with_qt:-DLOG4CXX_QT_SUPPORT=ON}
+
+%{__make} -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post   -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %doc KEYS LICENSE NOTICE
 %attr(755,root,root) %{_libdir}/liblog4cxx.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/liblog4cxx.so.10
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/html
+%attr(755,root,root) %ghost %{_libdir}/liblog4cxx.so.15
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/liblog4cxx.so
-%{_libdir}/liblog4cxx.la
 %{_includedir}/%{name}
 %{_pkgconfigdir}/liblog4cxx.pc
+%{_libdir}/cmake/log4cxx
+
+%if %{with qt}
+%files qt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblog4cxx-qt.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblog4cxx-qt.so.15
 
-%files static
+%files qt-devel
 %defattr(644,root,root,755)
-%{_libdir}/liblog4cxx.a
+%attr(755,root,root) %{_libdir}/liblog4cxx-qt.so
+%{_includedir}/log4cxx-qt
+%{_pkgconfigdir}/liblog4cxx-qt.pc
+%{_libdir}/cmake/log4cxx-qt
+%endif
This page took 0.033873 seconds and 4 git commands to generate.