]> git.ipfire.org Git - ipfire-3.x.git/blame - rp-pppoe/rp-pppoe.nm
rp-pppoe: Depend on pppd for which this has been compiled for
[ipfire-3.x.git] / rp-pppoe / rp-pppoe.nm
CommitLineData
ef7344ff
MT
1###############################################################################
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
4###############################################################################
5
6name = rp-pppoe
6564ae03 7version = 3.11
92da7264 8release = 2
ef7344ff
MT
9
10groups = Networking/Dialin
11url = http://www.roaringpenguin.com/pppoe/
12license = GPLv2+
13summary = Administration tools for PPPoE connections.
14
15description
16 PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used by
17 many ADSL Internet Service Providers.
18 This package contains a set of tools to build your own PPPoE server.
19end
20
21source_dl = http://www.roaringpenguin.com/files/download/
22
23build
24 requires
25 autoconf
26 automake
27 iproute2
28 libtool
29 ppp-devel
3af79146 30 systemd-units
ef7344ff
MT
31 end
32
33 DIR_APP := %{DIR_APP}/src
34 CFLAGS += -D_GNU_SOURCE -fno-strict-aliasing
35
92da7264
MT
36 pppd_version = %(pppd --version 2>&1 | awk '{ print $NF }')
37
ef7344ff
MT
38 prepare_cmds
39 # PLUGIN_DIR defaults to /etc/ppp/plugins, which is not what we want.
40 sed -i Makefile.in \
92da7264 41 -e "s@^PLUGIN_DIR=.*@PLUGIN_DIR=%{libdir}/pppd/%{pppd_version}@"
ef7344ff
MT
42
43 # Always enable kernel mode PPPoE for the server, because we
44 # don't ship the userspace component.
45 sed -i pppoe-server.c \
46 -e "s/UseLinuxKernelModePPPoE = 0/UseLinuxKernelModePPPoE = 1/"
47
48 autoconf
49 end
50
51 # Force support for kernel-mode PPPoE.
52 #configure_options += \
53 # ac_cv_header_linux_if_pppox_h=yes
54
55 install_cmds
56 # Remove all the client components because we only support the
57 # rp-pppoe plugin that comes with pppd.
58 rm -rvf %{BUILDROOT}%{sysconfdir}
59 rm -vf %{BUILDROOT}%{sbindir}/pppoe
60 rm -vf %{BUILDROOT}%{sbindir}/pppoe-{connect,start,stop,status,setup}
61 rm -vf %{BUILDROOT}%{mandir}/man*/pppoe-{connect,start,stop,status,setup}*
62 rm -vf %{BUILDROOT}%{mandir}/man*/pppoe.{,conf}*
3af79146 63 rm -rvf %{BUILDROOT}%{libdir}
ef7344ff
MT
64 end
65end
66
67packages
68 package %{name}
69 requires
70 iproute2
92da7264 71 ppp = %{pppd_version}
ef7344ff 72 end
3af79146
MT
73
74 script postin
75 systemctl daemon-reload >/dev/null 2>&1 || :
76 end
77
78 script postup
79 systemctl daemon-reload >/dev/null 2>&1 || :
80 end
81
82 script postun
83 systemctl daemon-reload >/dev/null 2>&1 || :
84 end
ef7344ff
MT
85 end
86
87 package %{name}-debuginfo
88 template DEBUGINFO
89 end
90end