From: Jan Rękorajski Date: Sat, 22 Oct 2016 17:43:13 +0000 (+0200) Subject: - parrallel build is broken X-Git-Tag: auto/th/openl2tp-1.8-5 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=7e5f9c6262ccbb561d7b2efb407899bd8b3681db;p=packages%2Fopenl2tp.git - parrallel build is broken - fix libdir - rel 5 --- diff --git a/no-hardcoded-libdir.patch b/no-hardcoded-libdir.patch new file mode 100644 index 0000000..3f3a969 --- /dev/null +++ b/no-hardcoded-libdir.patch @@ -0,0 +1,40 @@ +--- openl2tp-1.8/Makefile~ 2016-10-22 19:35:05.000000000 +0200 ++++ openl2tp-1.8/Makefile 2016-10-22 19:39:02.267356788 +0200 +@@ -29,28 +29,6 @@ + # Build for UML environment? + # UML_TARGET= y + +-# Location of shared libs. This is usually /usr/lib, but can be +-# /usr/lib32 or /usr/lib64 on 64-bit multi-arch systems. On 64-bit +-# systems which don't have 32-bit multi-arch libs installed, the +-# standard says build with /usr/lib. But Fedora uses /usr/lib64. We +-# try to handle these cases by deriving the CPU architecture +-# name. Things are made more complicated by the fact that the CPU +-# architecture is output by either uname -m or uname -p, depending on +-# uname version. Override SYS_LIBDIR from the command line when +-# necessary. +-SYS_LIBDIR=/usr/lib +-ifeq ($(CROSS_COMPILE),) +- ifeq ($(strip $(wildcard /etc/debian_version*)),) +- ifeq ($(shell uname -p),x86_64) +- SYS_LIBDIR=/usr/lib64 +- else +- ifeq ($(shell uname -m),x86_64) +- SYS_LIBDIR=/usr/lib64 +- endif +- endif +- endif +-endif +- + # Points to pppd install. By default, pppd headers are assumed to be + # in the pppd subdirectory of the compiler's default search path + # (e.g. /usr/include/pppd). but can be pointed to another directory if +@@ -62,7 +62,7 @@ + + export PPPD_VERSION PPPD_SRCDIR PPPD_LIBDIR READLINE_LDFLAGS READLINE_CFLAGS + export CROSS_COMPILE AS LD CC AR NM STRIP OBJCOPY OBJDUMP INSTALL UML_TARGET +-export DESTDIR SYS_LIBDIR ++export DESTDIR + + # Feature options are exported to sub-makes + export L2TP_FEATURE_LAC_SUPPORT diff --git a/openl2tp.spec b/openl2tp.spec index fc1c376..c22c91b 100644 --- a/openl2tp.spec +++ b/openl2tp.spec @@ -2,7 +2,7 @@ Summary: An L2TP client/server, designed for VPN use Name: openl2tp Version: 1.8 -Release: 4 +Release: 5 License: GPL Group: Networking/Daemons Source0: http://dl.sourceforge.net//openl2tp/%{name}-%{version}.tar.gz @@ -12,6 +12,7 @@ Source2: %{name}d.sysconfig Source3: %{name}.tmpfiles Patch0: %{name}-no_Werror.patch Patch1: %{name}-setkey.patch +Patch2: no-hardcoded-libdir.patch URL: http://www.openl2tp.org/ BuildRequires: bison BuildRequires: flex @@ -55,16 +56,21 @@ or applications that use the OpenL2TP APIs. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build -%{__make} CFLAGS.optimize="%{rpmcflags}" +%{__make} -j1 \ + CFLAGS.optimize="%{rpmcflags}" \ + SYS_LIBDIR=%{_libdir} %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,/var/run/%{name}} \ $RPM_BUILD_ROOT/usr/lib/tmpfiles.d -%{__make} install DESTDIR=$RPM_BUILD_ROOT +%{__make} install \ + SYS_LIBDIR=%{_libdir} \ + DESTDIR=$RPM_BUILD_ROOT install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/openl2tpd install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/openl2tpd