--- /dev/null
+--- 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
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
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
%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