```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
# Template file for 'opkg'
|
|
pkgname=opkg
|
|
version=0.4.5
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--enable-sha256 --without-libsolv --with-static-libopkg
|
|
$(vopt_if ssl '--enable-openssl --enable-ssl-curl') $(vopt_enable gpg)"
|
|
hostmakedepends="pkg-config libtool automake"
|
|
makedepends="libarchive-devel libcurl-devel $(vopt_if gpg gpgme-devel)"
|
|
checkdepends="python3"
|
|
short_desc="Lightweight package management system, compatible with ipkg"
|
|
maintainer="Piraty <piraty1@inbox.ru>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://code.google.com/p/opkg/"
|
|
distfiles="https://downloads.yoctoproject.org/releases/opkg/opkg-${version}.tar.gz"
|
|
checksum=a1214a75fa34fb9228db8da47308e0e711b1c93fd8938cf164c10fd28eb50f1e
|
|
|
|
build_options="gpg lz4 ssl"
|
|
build_options_default="ssl"
|
|
desc_option_gpg="Enable signature checking with gpgme"
|
|
desc_option_ssl="Enable certificate authentication with curl"
|
|
|
|
pre_configure() {
|
|
autoreconf -isf
|
|
}
|
|
|
|
libopkg_package() {
|
|
short_desc+=" - runtime libraries"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
|
|
libopkg-devel_package() {
|
|
short_desc+=" - runtime libraries - development files"
|
|
depends="libopkg>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|