]>
Commit | Line | Data |
---|---|---|
d316c1c0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without libesmtp # (E)SMTP support via libesmtp | |
ff9ca09b | 4 | %bcond_without qt # Qt support library |
d316c1c0 | 5 | |
12cd7d45 | 6 | Summary: Log4cxx - a port to C++ of the log4j project |
b081aded | 7 | Summary(pl.UTF-8): Log4cxx - port projektu log4j dla C++ |
9eb0d9b9 | 8 | Name: log4cxx |
3f19a639 | 9 | Version: 1.0.0 |
1851dec8 | 10 | Release: 3 |
61d4f696 | 11 | License: Apache v2.0 |
9eb0d9b9 | 12 | Group: Libraries |
3f19a639 AM |
13 | Source0: http://www.apache.org/dist/logging/log4cxx/%{version}/apache-%{name}-%{version}.tar.gz |
14 | # Source0-md5: 2255f30cd968e2c1976081824e435bd5 | |
d316c1c0 | 15 | Patch0: %{name}-libesmtp.patch |
9eb0d9b9 | 16 | URL: http://logging.apache.org/log4cxx/ |
ff9ca09b | 17 | %{?with_qt:BuildRequires: Qt5Core-devel >= 5} |
b7e3fe72 JB |
18 | BuildRequires: apr-devel >= 1 |
19 | BuildRequires: apr-util-devel >= 1 | |
3f19a639 | 20 | BuildRequires: boost-devel |
b7e3fe72 JB |
21 | BuildRequires: cmake >= 3.13 |
22 | # for tests | |
23 | BuildRequires: expat-devel >= 1.95 | |
d316c1c0 | 24 | %{?with_libesmtp:BuildRequires: libesmtp-devel} |
b7e3fe72 JB |
25 | BuildRequires: libfmt-devel >= 7.1 |
26 | BuildRequires: libstdc++-devel >= 6:7 | |
27 | BuildRequires: pkgconfig | |
28 | BuildRequires: rpmbuild(macros) >= 1.605 | |
29 | BuildRequires: unixODBC-devel | |
9eb0d9b9 | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
d4b912c0 | 33 | Log4cxx is C++ port of Log4j. Log4cxx attempts to mimic log4j usage as |
9eb0d9b9 | 34 | much as the language will allow and to be compatible with log4j |
35 | configuration and output formats. | |
36 | ||
97f33763 JR |
37 | %description -l pl.UTF-8 |
38 | Log4cxx jest portem Log4j dla C++. Log4cxx próbuje naśladować | |
3f19a639 AM |
39 | użytkowanie log4j tak bardzo na ile pozwala na to język oraz próbuje |
40 | być kompatybilnym z plikami konfiguracyjnymi i formatami wyjściowymi | |
41 | log4j. | |
d4b912c0 | 42 | |
9eb0d9b9 | 43 | %package devel |
44 | Summary: Header files for log4cxx library | |
b081aded | 45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki log4cxx |
9eb0d9b9 | 46 | Group: Development/Libraries |
12cd7d45 | 47 | Requires: %{name} = %{version}-%{release} |
b7e3fe72 JB |
48 | Requires: apr-devel >= 1 |
49 | Requires: apr-util-devel >= 1 | |
50 | Requires: libstdc++-devel >= 6:7 | |
006f5065 | 51 | Obsoletes: log4cxx-static < 1 |
9eb0d9b9 | 52 | |
53 | %description devel | |
54 | This is the package containing the header files for log4cxx library. | |
55 | ||
97f33763 JR |
56 | %description devel -l pl.UTF-8 |
57 | Ten pakiet zawiera pliki nagłówkowe biblioteki log4cxx. | |
9eb0d9b9 | 58 | |
ff9ca09b JB |
59 | %package qt |
60 | Summary: Qt support library for log4cxx C++ logging framework | |
61 | Summary(pl.UTF-8): Biblioteka wsparcia Qt do szkieletu logującego C++ log4cxx | |
62 | Group: Libraries | |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description qt | |
66 | Qt support library for log4cxx C++ logging framework. | |
67 | ||
68 | %description qt -l pl.UTF-8 | |
69 | Biblioteka wsparcia Qt do szkieletu logującego C++ log4cxx. | |
70 | ||
71 | %package qt-devel | |
72 | Summary: Header files for log4cxx Qt library | |
73 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki log4cxx Qt | |
74 | Group: Development/Libraries | |
75 | Requires: %{name}-devel = %{version}-%{release} | |
76 | Requires: %{name}-qt = %{version}-%{release} | |
77 | Requires: Qt5Core-devel >= 5 | |
78 | ||
79 | %description qt-devel | |
80 | Header files for log4cxx Qt library. | |
81 | ||
82 | %description qt-devel -l pl.UTF-8 | |
83 | Pliki nagłówkowe biblioteki log4cxx Qt. | |
84 | ||
9eb0d9b9 | 85 | %prep |
de4213a3 | 86 | %setup -q -n apache-%{name}-%{version} |
d316c1c0 | 87 | %patch0 -p1 |
2c729fc0 | 88 | |
9eb0d9b9 | 89 | %build |
b7e3fe72 JB |
90 | %cmake -B build \ |
91 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
92 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ | |
ff9ca09b JB |
93 | %{!?with_libesmtp:-DHAS_LIBESMTP=OFF} \ |
94 | %{?with_qt:-DLOG4CXX_QT_SUPPORT=ON} | |
b7e3fe72 JB |
95 | |
96 | %{__make} -C build | |
9eb0d9b9 | 97 | |
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
b7e3fe72 | 100 | |
3f19a639 | 101 | %{__make} -C build install \ |
9eb0d9b9 | 102 | DESTDIR=$RPM_BUILD_ROOT |
103 | ||
104 | %clean | |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
b7e3fe72 JB |
107 | %post -p /sbin/ldconfig |
108 | %postun -p /sbin/ldconfig | |
9eb0d9b9 | 109 | |
110 | %files | |
111 | %defattr(644,root,root,755) | |
57c55d87 | 112 | %doc KEYS LICENSE NOTICE |
9eb0d9b9 | 113 | %attr(755,root,root) %{_libdir}/liblog4cxx.so.*.*.* |
3f19a639 | 114 | %attr(755,root,root) %ghost %{_libdir}/liblog4cxx.so.15 |
9eb0d9b9 | 115 | |
116 | %files devel | |
117 | %defattr(644,root,root,755) | |
9eb0d9b9 | 118 | %attr(755,root,root) %{_libdir}/liblog4cxx.so |
12cd7d45 | 119 | %{_includedir}/%{name} |
61d4f696 | 120 | %{_pkgconfigdir}/liblog4cxx.pc |
3f19a639 | 121 | %{_libdir}/cmake/log4cxx |
ff9ca09b JB |
122 | |
123 | %if %{with qt} | |
124 | %files qt | |
125 | %defattr(644,root,root,755) | |
126 | %attr(755,root,root) %{_libdir}/liblog4cxx-qt.so.*.*.* | |
127 | %attr(755,root,root) %ghost %{_libdir}/liblog4cxx-qt.so.15 | |
128 | ||
129 | %files qt-devel | |
130 | %defattr(644,root,root,755) | |
131 | %attr(755,root,root) %{_libdir}/liblog4cxx-qt.so | |
132 | %{_includedir}/log4cxx-qt | |
133 | %{_pkgconfigdir}/liblog4cxx-qt.pc | |
134 | %endif |