summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2018-08-02 15:07:58 +0000
committerMartin Matuska <mm@FreeBSD.org>2018-08-02 15:07:58 +0000
commit979c63dd8754033e80b216ac943be6c927611eaf (patch)
treedd805a535a89deed6894bcc365fde437dbd5c1d5
parentNew port: devel/libubox (diff)
New port: archivers/opkg
The opkg utility (an ipkg fork) is a lightweight package manager used to download and install OpenWrt packages from local package repositories or ones located in the Internet. opkg is part of the OpenWrt project WWW: https://wiki.openwrt.org/doc/techref/opkg
Notes
Notes: svn path=/head/; revision=476237
-rw-r--r--archivers/Makefile1
-rw-r--r--archivers/opkg/Makefile61
-rw-r--r--archivers/opkg/distinfo3
-rw-r--r--archivers/opkg/pkg-descr7
-rw-r--r--archivers/opkg/pkg-plist4
5 files changed, 76 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index 8e751ebc45b7..942e8d95b2e1 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -97,6 +97,7 @@
SUBDIR += nwreckdum
SUBDIR += ocaml-bz2
SUBDIR += ocaml-zip
+ SUBDIR += opkg
SUBDIR += p5-Archive-Any
SUBDIR += p5-Archive-Any-Lite
SUBDIR += p5-Archive-Any-Plugin-Rar
diff --git a/archivers/opkg/Makefile b/archivers/opkg/Makefile
new file mode 100644
index 000000000000..e5422e90f49f
--- /dev/null
+++ b/archivers/opkg/Makefile
@@ -0,0 +1,61 @@
+# Created by: Martin Matuska <mm@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= opkg
+DISTVERSION= 20180802
+DISTVERSIONSUFFIX= -3b417b9f
+CATEGORIES= archivers sysutils
+MASTER_SITES= LOCAL/mm/openwrt
+
+MAINTAINER= mm@FreeBSD.org
+COMMENT= OpenWrt package manager
+
+LICENSE= GPLv2
+
+OPKG_GITURL= https://git.openwrt.org/project/opkg-lede.git
+
+USES= cmake tar:xz
+LIB_DEPENDS+= libubox.so:devel/libubox
+
+.include <bsd.port.pre.mk>
+
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CMAKE_ARGS+= -DLUAPATH="${LUA_MODLIBDIR}" \
+ -DPATH_SPEC="${LOCALBASE}/sbin:${LOCALBASE}/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,/etc/opkg.conf,${PREFIX}/etc/opkg.conf,g' \
+ ${WRKSRC}/src/opkg-cl.c
+ @${REINPLACE_CMD} -e 's,ROOT="",ROOT="${PREFIX}",g' \
+ ${WRKSRC}/utils/opkg-key
+ @${REINPLACE_CMD} -e \
+ 's,OPKGETCDIR="/etc",OPKGETCDIR="${PREFIX}/etc",g' \
+ ${WRKSRC}/CMakeLists.txt
+ @${REINPLACE_CMD} -e 's,@PACKAGE_NAME@,opkg-cl,g' \
+ -e 's,@PACKAGE_STRING@,opkg-cl,g' \
+ -e 's|@CLEAN_DATE@|October 5, 2010|g' \
+ ${WRKSRC}/man/opkg-cl.1.in
+ @${REINPLACE_CMD} -e 's,@PACKAGE_NAME@,opkg-key,g' \
+ -e 's,@PACKAGE_STRING@,opkg-key,g' \
+ -e 's|@CLEAN_DATE@|October 8, 2010|g' \
+ ${WRKSRC}/man/opkg-key.1.in
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/utils/opkg-key ${STAGEDIR}${PREFIX}/bin
+.for file in opkg-cl.1 opkg-key.1
+ ${INSTALL_MAN} ${WRKSRC}/man/${file}.in \
+ ${STAGEDIR}${MANPREFIX}/man/man1/${file}
+.endfor
+
+maintainer-fetch:
+ @${MAKE} clean
+ @${MKDIR} ${WRKSRC}
+ @git clone ${OPKG_GITURL} ${WRKSRC}
+ @cd ${WRKSRC} && git reset --hard ${DISTVERSIONSUFFIX:S|^-||}
+ @${TAR} -c -J -f ${_DISTDIR:S|/$||}/${DISTFILES:M${PORTNAME}-*} \
+ -C ${WRKDIR} --exclude .git ${WRKSRC:S|${WRKDIR}/||}
+ @${MAKE} makesum
+ @${MAKE} clean
+
+.include <bsd.port.post.mk>
diff --git a/archivers/opkg/distinfo b/archivers/opkg/distinfo
new file mode 100644
index 000000000000..3539ea1437e0
--- /dev/null
+++ b/archivers/opkg/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1533218886
+SHA256 (opkg-20180802-3b417b9f.tar.xz) = f03cbf7f22c8fe1ab9d43a2562be1bbc1eb0b236d817b735e74e3a1ceebe9c78
+SIZE (opkg-20180802-3b417b9f.tar.xz) = 120104
diff --git a/archivers/opkg/pkg-descr b/archivers/opkg/pkg-descr
new file mode 100644
index 000000000000..2c79f9058dac
--- /dev/null
+++ b/archivers/opkg/pkg-descr
@@ -0,0 +1,7 @@
+The opkg utility (an ipkg fork) is a lightweight package manager used
+to download and install OpenWrt packages from local package repositories
+or ones located in the Internet.
+
+opkg is part of the OpenWrt project
+
+WWW: https://wiki.openwrt.org/doc/techref/opkg
diff --git a/archivers/opkg/pkg-plist b/archivers/opkg/pkg-plist
new file mode 100644
index 000000000000..edb4707c1daa
--- /dev/null
+++ b/archivers/opkg/pkg-plist
@@ -0,0 +1,4 @@
+bin/opkg-cl
+bin/opkg-key
+man/man1/opkg-cl.1.gz
+man/man1/opkg-key.1.gz