]> git.pld-linux.org Git - packages/belcard.git/blame - belcard.spec
- cleanup, updated dependencies, require belr built with cmake
[packages/belcard.git] / belcard.spec
CommitLineData
4c254caf
JB
1#
2# Conditional build:
3%bcond_without static_libs # don't build static libraries
4#
5Summary: Belledonne Communications' vCard 4 parsing library
6Summary(pl.UTF-8): Biblioteka Belledonne Communications do analizy formatu vCard 4
7Name: belcard
0bafb1c5 8Version: 4.5.20
4c254caf
JB
9Release: 1
10License: GPL v2+
11Group: Libraries
0bafb1c5
JB
12#Source0Download: https://gitlab.linphone.org/BC/public/belcard/-/tags
13Source0: https://gitlab.linphone.org/BC/public/belcard/-/archive/%{version}/%{name}-%{version}.tar.bz2
14# Source0-md5: 6c0ebca77e42cc8591bc2c895458e3ef
36e8b22a 15Patch0: %{name}-static.patch
4c254caf 16URL: https://linphone.org/
4c254caf
JB
17BuildRequires: bctoolbox-devel >= 0.0.3
18BuildRequires: bcunit-devel
f826c37e
JB
19BuildRequires: belr-devel >= 4.5.0
20BuildRequires: cmake >= 3.1
4c254caf 21BuildRequires: libstdc++-devel >= 6:4.7
4c254caf
JB
22BuildRequires: pkgconfig
23BuildRequires: xxd
24Requires: bctoolbox >= 0.0.3
f826c37e 25Requires: belr >= 4.5.0
4c254caf
JB
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29Belcard is a C++ library to manipulate VCard standard format.
30
31%description -l pl.UTF-8
32Belcard to biblioteka C++ do operacji na danych w standardzie VCard.
33
34%package devel
35Summary: Header files for BelCard library
36Summary(pl.UTF-8): Pliki nagłówkowe biblioteki BelCard
37Group: Development/Libraries
38Requires: %{name} = %{version}-%{release}
39Requires: bctoolbox-devel >= 0.0.3
f826c37e 40Requires: belr-devel >= 4.5.0
4c254caf
JB
41Requires: libstdc++-devel >= 6:4.7
42
43%description devel
44Header files for BelCard library.
45
46%description devel -l pl.UTF-8
47Pliki nagłówkowe biblioteki BelCard.
48
49%package static
50Summary: Static BelCard library
51Summary(pl.UTF-8): Statyczna biblioteka BelCard
52Group: Development/Libraries
53Requires: %{name}-devel = %{version}-%{release}
54
55%description static
56Static BelCard library.
57
58%description static -l pl.UTF-8
59Statyczna biblioteka BelCard.
60
61%prep
0bafb1c5 62%setup -q
4c254caf
JB
63%patch0 -p1
64
65%build
36e8b22a
JB
66install -d build
67cd build
f826c37e
JB
68%cmake .. \
69 %{!?with_static_libs:-DENABLE_STATIC=OFF}
36e8b22a
JB
70
71%{__make}
4c254caf
JB
72
73%install
74rm -rf $RPM_BUILD_ROOT
75
36e8b22a 76%{__make} -C build install \
4c254caf
JB
77 DESTDIR=$RPM_BUILD_ROOT
78
36e8b22a
JB
79# disable completeness check incompatible with split packaging
80%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/belcard/cmake/belcardTargets.cmake
81
82# missing from cmake
83test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/belcard.pc
84install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
85%{__sed} -e 's,@CMAKE_INSTALL_PREFIX@,%{_prefix},' \
86 -e 's,@PROJECT_NAME@,belcard,' \
87 -e 's,@PROJECT_VERSION@,%{version},' \
88 -e 's,@CMAKE_INSTALL_FULL_LIBDIR@,%{_libdir},' \
89 -e 's,@LIBS_PRIVATE@,-lbelr -lbctoolbox,' \
90 -e 's,@CMAKE_INSTALL_FULL_INCLUDEDIR@,%{_includedir},' \
91 belcard.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/belcard.pc
f826c37e 92
4c254caf
JB
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%post -p /sbin/ldconfig
97%postun -p /sbin/ldconfig
98
99%files
100%defattr(644,root,root,755)
0bafb1c5 101%doc CHANGELOG.md README.md
4c254caf
JB
102%attr(755,root,root) %{_bindir}/belcard-folder
103%attr(755,root,root) %{_bindir}/belcard-parser
104%attr(755,root,root) %{_bindir}/belcard-unfolder
36e8b22a
JB
105%attr(755,root,root) %{_bindir}/belcard_tester
106%attr(755,root,root) %{_libdir}/libbelcard.so.1
107%{_datadir}/belcard_tester
108# dirs should belong to belr?
109%dir %{_datadir}/belr
110%dir %{_datadir}/belr/grammars
111%{_datadir}/belr/grammars/vcard_grammar
4c254caf
JB
112
113%files devel
114%defattr(644,root,root,755)
115%attr(755,root,root) %{_libdir}/libbelcard.so
116%{_includedir}/belcard
117%{_pkgconfigdir}/belcard.pc
36e8b22a
JB
118%dir %{_datadir}/belcard
119%{_datadir}/belcard/cmake
4c254caf
JB
120
121%if %{with static_libs}
122%files static
123%defattr(644,root,root,755)
124%{_libdir}/libbelcard.a
125%endif
This page took 0.837209 seconds and 4 git commands to generate.