1 # Build recipe for lpppd (a fork of ppp).
3 # Copyright (c) 2019-2021 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
21 version=20210106_7454257
24 # Define a category for the output of the package name
25 pkgcategory=networking
27 tarname=${program}-${version}.tar.lz
31 https://dragora.mirror.garr.it/current/sources/$tarname
32 rsync://rsync.dragora.org/current/sources/$tarname
36 PPP daemon and associated utilities.
38 The lpppd package is a fork based on Paul Mackerras' PPP:
40 Targets glibc, musl libc and uClibc.
41 Collecting patches from various sources.
42 Use CMake build system.
43 Support for non-Linux systems removed.
44 Legacy protocol and library support removed.
45 Some general code modernization.
46 Building of plugins not supported at this time.
49 homepage=https://github.com/snickl/lpppd
50 license="GPLv2+ | Public domain, BSD-style notices"
52 # Source documentation
53 docs="CHANGELOG.md FAQ PLUGINS README* SETUP"
54 docsdir="${docdir}/${program}-${version}"
58 unpack "${tardir}/$tarname"
66 -DCMAKE_C_FLAGS_RELEASE:STRING="$QICFLAGS -fPIC -Wall -fno-strict-aliasing" \
67 -DCMAKE_EXE_LINKER_FLAGS:STRING="$QILDFLAGS" \
68 -DCMAKE_INSTALL_PREFIX=/usr \
69 -DCMAKE_BUILD_TYPE=Release \
70 -DCMAKE_VERBOSE_MAKEFILE=ON \
71 -DOPTION_LPPPD_INET6=ON \
72 -DOPTION_LPPPD_PPPD_FILTER=ON \
73 -DOPTION_LPPPD_PPPD_MULTILINK=ON \
77 DESTDIR="$destdir" ninja -j${jobs} install
81 # Include pppd headers to expose rp-pppoe plugins
82 mkdir -p "${destdir}/usr/include/pppd"
85 cp -p $file "${destdir}/usr/include/pppd"/
86 chmod 644 "${destdir}/usr/include/pppd/${file##*/}"
90 mkdir -p "${destdir}/usr/include/net"
91 cp -p include/net/ppp_defs.h "${destdir}/usr/include/net"/
92 chmod 644 "${destdir}/usr/include/net/ppp_defs.h"
94 # Add configuration files
95 mkdir -p "${destdir}/etc/ppp/peers"
98 cp -p $file "${destdir}/etc/ppp"/
99 chmod 644 "${destdir}/etc/ppp/${file##*/}"
103 chmod 600 "${destdir}"/etc/ppp/*-secrets*
104 touch "${destdir}/etc/ppp/.graft-config"
107 for file in plog poff pon
109 cp -p scripts/${file} "${destdir}/usr/sbin"/
110 chmod 755 "${destdir}/usr/sbin/$file"
114 # Include manual page for pon
115 mkdir -p "${destdir}/${mandir}/man1"
116 cp -p scripts/pon.1 "${destdir}/${mandir}/man1"/
118 # Compress and link man pages (if needed)
119 if test -d "${destdir}/$mandir"
122 cd "${destdir}/$mandir"
123 find . -type f -exec lzip -9 {} +
124 find . -type l | while read -r file
126 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
133 mkdir -p "${destdir}/$docsdir"
134 cp -p $docs "${destdir}/$docsdir"