]> git.ipfire.org Git - ipfire-3.x.git/blob - rp-pppoe/rp-pppoe.nm
rp-pppoe: Update to 3.12
[ipfire-3.x.git] / rp-pppoe / rp-pppoe.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = rp-pppoe
7 version = 3.12
8 release = 1
9
10 groups = Networking/Dialin
11 url = https://www.roaringpenguin.com/products/pppoe
12 license = GPLv2+
13 summary = Administration tools for PPPoE connections.
14
15 description
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.
19 end
20
21 source_dl = http://www.roaringpenguin.com/files/download/
22
23 build
24 requires
25 autoconf
26 automake
27 iproute2
28 libtool
29 ppp-devel
30 systemd-units
31 end
32
33 DIR_APP := %{DIR_APP}/src
34 CFLAGS += -D_GNU_SOURCE -fno-strict-aliasing
35
36 pppd_version = %(pppd --version 2>&1 | awk '{ print $NF }')
37
38 prepare_cmds
39 # PLUGIN_DIR defaults to /etc/ppp/plugins, which is not what we want.
40 sed -i Makefile.in \
41 -e "s@^PLUGIN_DIR=.*@PLUGIN_DIR=%{libdir}/pppd/%{pppd_version}@"
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}*
63 rm -rvf %{BUILDROOT}%{libdir}
64 end
65 end
66
67 packages
68 package %{name}
69 requires
70 iproute2
71 ppp = %{pppd_version}
72 end
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
85 end
86
87 package %{name}-debuginfo
88 template DEBUGINFO
89 end
90 end