]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - ppp/ppp.nm
ppp: Re-add ifname patch
[people/ms/ipfire-3.x.git] / ppp / ppp.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = ppp
7 version = 2.4.6
8 release = 2
9
10 groups = System/Daemons
11 url = http://ppp.samba.org/
12 license = BSD and LGPLv2+ and GPLv2+ and Public Domain
13 summary = The PPP (Point-to-Point Protocol) daemon.
14
15 description
16 The ppp package contains the PPP (Point-to-Point Protocol) daemon and
17 documentation for PPP support. The PPP protocol provides a method for
18 transmitting datagrams over serial point-to-point links. PPP is
19 usually used to dial in to an ISP or other organization over a modem
20 and phone line.
21 end
22
23 source_dl = ftp://ftp.samba.org/pub/ppp/
24
25 build
26 requires
27 libpcap-devel
28 libudev-devel
29 linux-atm-devel
30 openssl-devel
31 pam-devel
32 systemd-units
33 end
34
35 # Explicitely add -fPIC to CFLAGS.
36 CFLAGS += -fPIC
37
38 prepare_cmds
39 sed -e "s@^RUNDIR .*@RUNDIR = /run/ppp@" \
40 -e "s@^LOGDIR .*@LOGDIR = /var/log/ppp@" \
41 -i linux/Makefile.top
42
43 sed -e "s@^DESTDIR.*@DESTDIR=\$%{INSTROOT}/usr@" \
44 -i pppd/plugins/pppol2tp/Makefile.linux
45
46 # Remove broken header file that crashed the build.
47 rm -f include/linux/if_pppol2tp.h
48 end
49
50 make_build_targets += \
51 CC="gcc %{CFLAGS}"
52
53 install
54 make install INSTROOT=%{BUILDROOT}
55
56 rm -rfv %{BUILDROOT}/etc/ppp/plugins
57
58 mkdir -pv %{BUILDROOT}/etc/ppp
59 touch %{BUILDROOT}/etc/ppp/secrets
60 chmod -v 600 %{BUILDROOT}/etc/ppp/secrets
61 ln -svf secrets %{BUILDROOT}/etc/ppp/pap-secrets
62 ln -svf secrets %{BUILDROOT}/etc/ppp/chap-secrets
63
64 mkdir -pv %{BUILDROOT}%{localstatedir}/lock/ppp
65 mkdir -pv %{BUILDROOT}/run/ppp
66 end
67 end
68
69 packages
70 package %{name}
71 requires
72 /usr/lib/network/helpers/pppd-angel
73 end
74
75 script postin
76 systemctl daemon-reload >/dev/null 2>&1 || :
77 end
78
79 script postup
80 systemctl daemon-reload >/dev/null 2>&1 || :
81 end
82
83 script postun
84 systemctl daemon-reload >/dev/null 2>&1 || :
85 end
86 end
87
88 package %{name}-devel
89 template DEVEL
90 end
91
92 package %{name}-debuginfo
93 template DEBUGINFO
94 end
95 end