%package -n vconf-compat
Summary: buxton wrapper for vconf APIs
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}
Requires: /usr/bin/getopt
Obsoletes: vconf-buxton
Obsoletes: vconf
%package -n vconf-compat-devel
Summary: buxton wrapper for vconf APIs (devel)
-Requires: vconf-compat = %{version}-%{release}
+Requires: vconf-compat = %{version}
Requires: vconf-internal-keys-devel
BuildRequires: pkgconfig(vconf-internal-keys)
Obsoletes: vconf-buxton-devel
%description -n vconf-compat-devel
Buxton wrapper library for providing vconf APIs (devel)
+%if 0%{?gcov:1}
+%package gcov
+Summary: buxton wrapper for vconf APIs (gcov)
+Group: Application Framework/API
+
+%description gcov
+gcov objects for a buxton2 library
+%endif
+
%prep
%setup -q
cp %{SOURCE1001} .
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
# for Address space layout randomization
export CFLAGS="$CFLAGS -fPIE"
export LDFLAGS="$LDFLAGS -pie"
%__make %{?_smp_mflags}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
%install
%make_install
mkdir -p %{buildroot}%{upgrade_script_path}
cp -f scripts/290.buxton2_upgrade.sh %{buildroot}%{upgrade_script_path}
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
+
%post
/sbin/ldconfig
%{_libdir}/libvconf.so
%{_libdir}/pkgconfig/vconf.pc
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif