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