Improve compatibility with new CMake macro
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
28dc2c4b1f
commit
bcd0dbcad6
22
c-ares.spec
22
c-ares.spec
@ -26,16 +26,14 @@ by Greg Hudson at MIT.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for c-ares
|
Summary: Development files for c-ares
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains the header files and libraries needed to
|
This package contains the header files and libraries needed to
|
||||||
compile applications or shared objects that use c-ares.
|
compile applications or shared objects that use c-ares.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
%patch0 -p1 -b .optflags
|
|
||||||
|
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
||||||
@ -45,31 +43,33 @@ f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
|
|||||||
# %%configure --enable-shared --disable-static \
|
# %%configure --enable-shared --disable-static \
|
||||||
# --disable-dependency-tracking
|
# --disable-dependency-tracking
|
||||||
%if %{use_cmake}
|
%if %{use_cmake}
|
||||||
%{cmake} -DCMAKE_INSTALL_LIBDIR:PATH="%{_libdir}" -DCARES_BUILD_TOOLS:BOOL=OFF .
|
%{cmake} -DCMAKE_INSTALL_LIBDIR:PATH="%{_libdir}" -DCARES_BUILD_TOOLS:BOOL=OFF
|
||||||
|
%cmake_build
|
||||||
%else
|
%else
|
||||||
autoreconf -if
|
autoreconf -if
|
||||||
%configure --enable-shared --disable-static \
|
%configure --enable-shared --disable-static \
|
||||||
--disable-dependency-tracking
|
--disable-dependency-tracking
|
||||||
%endif
|
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcares.la
|
|
||||||
|
|
||||||
%if %{use_cmake}
|
%if %{use_cmake}
|
||||||
|
%cmake_install
|
||||||
# When we used autotooling, we got man pages installed automagically
|
# When we used autotooling, we got man pages installed automagically
|
||||||
# but no cmake helpers were generated.
|
# but no cmake helpers were generated.
|
||||||
# Now, we use cmake, so we have to copy the man pages manually.
|
# Now, we use cmake, so we have to copy the man pages manually.
|
||||||
mkdir -p %{buildroot}%{_mandir}/man3
|
mkdir -p %{buildroot}%{_mandir}/man3
|
||||||
cp -a ares_*.3 %{buildroot}%{_mandir}/man3/
|
cp -a ares_*.3 %{buildroot}%{_mandir}/man3/
|
||||||
|
%else
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcares.la
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.cares CHANGES NEWS LICENSE
|
%license LICENSE
|
||||||
|
%doc README.cares CHANGES NEWS
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
Loading…
Reference in New Issue
Block a user