Fixed explicit disabling of GUI build when Qt is present but unusable.

Fixed binaries stripping to preserve file date to avoid dependency problems.
Added possibility to specify custom RPM build commands and parameters.


git-svn-id: http://voip.null.ro/svn/yate@6120 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2016-05-27 11:57:26 +00:00
parent bf2390f6e9
commit a80dbdd7f7
4 changed files with 19 additions and 6 deletions

View File

@ -170,7 +170,7 @@ $(APIINDEX): @srcdir@/docs/Doxyfile \
.PHONY: strip sex love war
strip: all
-strip --strip-debug --discard-locals $(PROGS) $(SLIBS)
-strip --preserve-dates --strip-debug --discard-locals $(PROGS) $(SLIBS)
sex: strip
@echo 'Stripped for you!'

View File

@ -11,6 +11,7 @@ PACKAGE_RELEASE="1"
PACKAGE_STATUS="devel"
PACKAGE_REVISION=`svn info 2>/dev/null | sed -n 's,^Revision: *,,p'`
test -z "$PACKAGE_REVISION" && PACKAGE_REVISION=`cat "$srcdir/packing/revision.txt" 2>/dev/null`
AC_ARG_WITH(status,AC_HELP_STRING([--with-status=NAME],[use NAME as package status]),[PACKAGE_STATUS=$withval])
PACKAGE_VERSION_MAJOR="${PACKAGE_VERSION%%.*}"
PACKAGE_VERSION_MINOR="${PACKAGE_VERSION#*.}"

View File

@ -9,6 +9,7 @@ CXX := @CXX@ -Wall
OBJCXX := @CXX@ -Wall
SED := sed
DEFS :=
LIBENG:=
LIBAUX:= @DLOPEN_LIB@ @LIBS@
LIBTHR:= @THREAD_LIB@
INCLUDES := -I.. -I@top_srcdir@
@ -138,4 +139,4 @@ Makefile: @srcdir@/Makefile.in $(MKDEPS)
cd .. && ./config.status
../$(YLIB): $(LIBOBJS) $(LIBS)
$(LINK) -o $@ $(SONAME_OPT)$(YLIB) $^ $(LIBTHR) $(LIBAUX) $(MACOSX_LIB) @RESOLV_LIB@
$(LINK) -o $@ $(SONAME_OPT)$(YLIB) $^ $(LIBTHR) $(LIBAUX) $(LIBENG) $(MACOSX_LIB) @RESOLV_LIB@

View File

@ -15,6 +15,7 @@
%{!?systemd:%define systemd %(test -x /usr/bin/systemd && echo 1 || echo 0)}
%{!?_unitdir:%define _unitdir /usr/lib/systemd/system}
%{!?dist:%define dist %{nil}}
%{!?status:%define status @PACKAGE_STATUS@}
%{!?revision:%define revision %{nil}}
%{?nodeps:%define no_auto_deps 1}
%{?nopstn:%define no_pstn 1}
@ -65,13 +66,15 @@
Summary: Yet Another Telephony Engine
Name: @PACKAGE_TARNAME@
Version: @PACKAGE_VERSION@
Release: @PACKAGE_STATUS@%{revision}@PACKAGE_RELEASE@%{dist}
Release: %{status}%{revision}@PACKAGE_RELEASE@%{dist}
License: GPL
Packager: Paul Chitescu <paulc@voip.null.ro>
Source: http://yate.null.ro/tarballs/@PACKAGE_TARNAME@@PACKAGE_VERSION_MAJOR@/@PACKAGE_TARNAME@-@PACKAGE_VERSION@-@PACKAGE_STATUS@@PACKAGE_RELEASE@.tar.gz
Group: Applications/Communications
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://yate.null.ro/
%{?extra_prov:Provides: %{?extra_prov}}
%{?extra_reqs:Requires: %{?extra_reqs}}
BuildRequires: gcc-c++
# Distro maintainers please add other BuildRequires below this line
@ -497,6 +500,9 @@ test -x /usr/bin/update-menus && /usr/bin/update-menus || /bin/true
%postun qt4
test -x /usr/bin/update-menus && /usr/bin/update-menus || /bin/true
%define conf_gui %{nil}
%else
%define conf_gui --without-libqt4
%endif
@ -650,11 +656,12 @@ chmod +x %{local_find_requires} %{local_find_provides}
--libdir=%{_libdir} --mandir=%{_mandir} --with-archlib=%{_lib} \
--without-amrnb \
--without-spandsp --without-coredumper \
%{conf_sctp} %{conf_h323} %{conf_pstn} %{conf_usb}
make %{stripped}
%{conf_sctp} %{conf_h323} %{conf_pstn} %{conf_usb} %{conf_gui} %{?extra_conf}
make %{stripped} %{?extra_make}
%{?extra_step}
%install
make install DESTDIR=%{buildroot}
make install DESTDIR=%{buildroot} %{?extra_make}
rm %{buildroot}%{_sysconfdir}/yate/amrnbcodec.conf
rm %{buildroot}%{_sysconfdir}/yate/radiotest.conf
%if "%{systemd}" != "0"
@ -666,6 +673,10 @@ cp -p %{_builddir}/%{name}/packing/rpm/yate.init %{buildroot}%{_initrddir}/yate
%endif
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
cp -p %{_builddir}/%{name}/packing/yate.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/yate
%if "%{?extra_inst}"
export DESTDIR=%{buildroot}
%{?extra_inst}
%endif
%clean
# make clean