git: 1f2d001c004b - main - sysutils: add apt-mirror (devel version)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 10 Dec 2022 13:45:58 UTC
The branch main has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=1f2d001c004b5d8155d6874fdcf4ee1d7e86e28b commit 1f2d001c004b5d8155d6874fdcf4ee1d7e86e28b Author: Rene Ladan <rene@FreeBSD.org> AuthorDate: 2022-12-10 13:45:10 +0000 Commit: Rene Ladan <rene@FreeBSD.org> CommitDate: 2022-12-10 13:45:10 +0000 sysutils: add apt-mirror (devel version) A small and efficient tool that lets you mirror a part of or the whole Debian GNU/Linux distribution or any other apt sources. Main features: * It uses a config similar to APT's F<sources.list> * It's fully pool compliant * It supports multithreaded downloading * It supports multiple architectures at the same time * It can automatically remove unneeded files * It works well on an overloaded Internet connection * It never produces an inconsistent mirror including while mirroring * It works on all POSIX compliant systems with Perl and wget --- sysutils/Makefile | 1 + sysutils/apt-mirror-devel/Makefile | 25 +++++++++++++++++++++++++ sysutils/apt-mirror-devel/distinfo | 3 +++ sysutils/apt-mirror-devel/files/patch-Makefile | 17 +++++++++++++++++ sysutils/apt-mirror-devel/pkg-descr | 12 ++++++++++++ sysutils/apt-mirror-devel/pkg-plist | 8 ++++++++ 6 files changed, 66 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index ba48b9d67384..3ffd11dd3d2c 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -52,6 +52,7 @@ SUBDIR += apcctrl SUBDIR += apcpwr SUBDIR += apcupsd + SUBDIR += apt-mirror-devel SUBDIR += aptly SUBDIR += arc_summary SUBDIR += arcconf diff --git a/sysutils/apt-mirror-devel/Makefile b/sysutils/apt-mirror-devel/Makefile new file mode 100644 index 000000000000..44c3f5770653 --- /dev/null +++ b/sysutils/apt-mirror-devel/Makefile @@ -0,0 +1,25 @@ +PORTNAME= apt-mirror +DISTVERSION= 0.5.4-29 +DISTVERSIONSUFFIX= -gd1a0a7b +CATEGORIES= sysutils +PKGNAMESUFFIX= -devel + +MAINTAINER= rene@FreeBSD.org +COMMENT= Debian/Ubuntu apt sources mirroring tool +WWW= https://apt-mirror.github.io/ + +LICENSE= GPLv2 + +USES= perl5 shebangfix +SHEBANG_FILES= apt-mirror + +USE_GITHUB= yes + +RUN_DEPENDS= wget:ftp/wget + +NO_ARCH= yes + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/Makefile + +.include <bsd.port.mk> diff --git a/sysutils/apt-mirror-devel/distinfo b/sysutils/apt-mirror-devel/distinfo new file mode 100644 index 000000000000..169d99eaf666 --- /dev/null +++ b/sysutils/apt-mirror-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1670679313 +SHA256 (apt-mirror-apt-mirror-0.5.4-29-gd1a0a7b_GH0.tar.gz) = 33972b8dd866fa2f38932c736d01e4958388c5262c5fc132f4efb5f41d8bb93b +SIZE (apt-mirror-apt-mirror-0.5.4-29-gd1a0a7b_GH0.tar.gz) = 18790 diff --git a/sysutils/apt-mirror-devel/files/patch-Makefile b/sysutils/apt-mirror-devel/files/patch-Makefile new file mode 100644 index 000000000000..55816c519305 --- /dev/null +++ b/sysutils/apt-mirror-devel/files/patch-Makefile @@ -0,0 +1,17 @@ +--- Makefile.orig 2022-11-29 17:03:44 UTC ++++ Makefile +@@ -8,10 +8,12 @@ all: + dist: apt-mirror-$(VERSION).tar.xz + + install: +- install -m 755 -D apt-mirror $(DESTDIR)$(PREFIX)/bin/apt-mirror ++ mkdir -p $(DESTDIR)$(PREFIX)/bin ++ install -m 755 apt-mirror $(DESTDIR)$(PREFIX)/bin/apt-mirror + mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1/ + pod2man apt-mirror > $(DESTDIR)$(PREFIX)/share/man/man1/apt-mirror.1 +- if test ! -f $(DESTDIR)/etc/apt/mirror.list; then install -m 644 -D mirror.list $(DESTDIR)/etc/apt/mirror.list; fi ++ mkdir -p $(DESTDIR)/etc/apt ++ if test ! -f $(DESTDIR)/etc/apt/mirror.list; then install -m 644 mirror.list $(DESTDIR)/etc/apt/mirror.list; fi + mkdir -p $(DESTDIR)$(BASE_PATH)/mirror + mkdir -p $(DESTDIR)$(BASE_PATH)/skel + mkdir -p $(DESTDIR)$(BASE_PATH)/var diff --git a/sysutils/apt-mirror-devel/pkg-descr b/sysutils/apt-mirror-devel/pkg-descr new file mode 100644 index 000000000000..18361d89ec31 --- /dev/null +++ b/sysutils/apt-mirror-devel/pkg-descr @@ -0,0 +1,12 @@ +A small and efficient tool that lets you mirror a part of or +the whole Debian GNU/Linux distribution or any other apt sources. + +Main features: + * It uses a config similar to APT's F<sources.list> + * It's fully pool compliant + * It supports multithreaded downloading + * It supports multiple architectures at the same time + * It can automatically remove unneeded files + * It works well on an overloaded Internet connection + * It never produces an inconsistent mirror including while mirroring + * It works on all POSIX compliant systems with Perl and wget diff --git a/sysutils/apt-mirror-devel/pkg-plist b/sysutils/apt-mirror-devel/pkg-plist new file mode 100644 index 000000000000..62f753fb8ab7 --- /dev/null +++ b/sysutils/apt-mirror-devel/pkg-plist @@ -0,0 +1,8 @@ +/etc/apt/mirror.list +bin/apt-mirror +share/man/man1/apt-mirror.1.gz +@dir /etc/apt +@dir /var/spool/apt-mirror/mirror +@dir /var/spool/apt-mirror/skel +@dir /var/spool/apt-mirror/var +@dir /var/spool/apt-mirror