]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - ppp/ppp.nm
Merge remote-tracking branch 'stevee/compat-packages'
[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.5
8 release = 6
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 linux-atm-devel
29 openssl-devel
30 pam-devel
31 systemd-units
32 end
33
34 # Explicitely add -fPIC to CFLAGS.
35 CFLAGS += -fPIC
36
37 prepare_cmds
38 sed -e "s@^RUNDIR .*@RUNDIR = /run/ppp@" \
39 -e "s@^LOGDIR .*@LOGDIR = /var/log/ppp@" \
40 -i linux/Makefile.top
41
42 sed -e "s@^DESTDIR.*@DESTDIR=\$%{INSTROOT}/usr@" \
43 -i pppd/plugins/pppol2tp/Makefile.linux
44
45 # Remove broken header file that crashed the build.
46 rm -f include/linux/if_pppol2tp.h
47 end
48
49 make_build_targets += \
50 CC="gcc %{CFLAGS}"
51
52 install
53 make install INSTROOT=%{BUILDROOT}
54
55 rm -rfv %{BUILDROOT}/etc/ppp/plugins
56
57 mkdir -pv %{BUILDROOT}/etc/ppp
58 touch %{BUILDROOT}/etc/ppp/secrets
59 chmod -v 600 %{BUILDROOT}/etc/ppp/secrets
60 ln -svf secrets %{BUILDROOT}/etc/ppp/pap-secrets
61 ln -svf secrets %{BUILDROOT}/etc/ppp/chap-secrets
62
63 mkdir -pv %{BUILDROOT}%{localstatedir}/lock/ppp
64 mkdir -pv %{BUILDROOT}/run/ppp
65 end
66 end
67
68 packages
69 package %{name}
70 requires
71 /usr/lib/network/helpers/pppd-angel
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}-devel
88 template DEVEL
89 end
90
91 package %{name}-debuginfo
92 template DEBUGINFO
93 end
94 end