void-packages/srcpkgs/obexftp/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: convert patches to -Np1
```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
```
2021-06-20 13:17:29 +07:00

68 lines
1.9 KiB
Bash

# Template file for 'obexftp'
pkgname=obexftp
version=0.24.2
revision=2
wrksrc="${pkgname}-${version}-Source"
build_style=cmake
hostmakedepends="pkg-config"
makedepends="openobex-devel fuse-devel libbluetooth-devel expat-devel"
short_desc="OBEX transfer utilities"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp"
distfiles="${SOURCEFORGE_SITE}/openobex/${pkgname}-${version}-Source.tar.gz"
checksum=d40fb48e0a0eea997b3e582774b29f793919a625d54b87182e31a3f3d1c989a3
post_install() {
# Do not require 'bluetooth', does not exist.
sed -i '/Requires:/s/bluetooth//' ${DESTDIR}/usr/lib/pkgconfig/obexftp.pc
# The 'obexfs' package already provides these files
rm -fv ${DESTDIR}/usr/bin/{obexautofs,obexfs}
}
libbfb_package() {
short_desc="BFB protocol library"
pkg_install() {
vmove "usr/lib/libbfb.so.*"
}
}
libbfb-devel_package() {
short_desc="BFB protocol library - development files"
depends="libbfb-${version}_${revision}"
pkg_install() {
vmove usr/include/bfb
vmove usr/lib/libbfb.so
}
}
libmulticobex_package() {
short_desc="Multi-protocol cable OBEX library"
pkg_install() {
vmove "usr/lib/libmulticobex.so.*"
}
}
libmulticobex-devel_package() {
short_desc="Multi-protocol cable OBEX library - development files"
depends="libmulticobex-${version}_${revision}"
pkg_install() {
vmove usr/include/multicobex
vmove usr/lib/libmulticobex.so
}
}
libobexftp_package() {
short_desc="OBject EXchange file transfer library"
pkg_install() {
vmove "usr/lib/libobexftp.so.*"
}
}
libobexftp-devel_package() {
short_desc="OBject EXchange file transfer library - development files"
depends="openobex-devel libbfb-devel-${version}_${revision}
libmulticobex-devel-${version}_${revision}
libobexftp-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}