aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-12-01 11:02:48 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-12-01 11:03:38 +0000
commitbcba6ffb4d1926c73a3ff9a15649dc2f443a9127 (patch)
tree89a67d120044bd776e550406addc109205388b37
parent6ebfebd565341f5ea17b34bb913b413913c34fc0 (diff)
downloadports-bcba6ffb4d1926c73a3ff9a15649dc2f443a9127.tar.gz
ports-bcba6ffb4d1926c73a3ff9a15649dc2f443a9127.zip
ports-mgmt/portsdb: New port: Program that imports the FreeBSD ports tree into an SQLite database
-rw-r--r--ports-mgmt/Makefile1
-rw-r--r--ports-mgmt/portsdb/Makefile35
-rw-r--r--ports-mgmt/portsdb/distinfo3
-rw-r--r--ports-mgmt/portsdb/pkg-descr2
-rw-r--r--ports-mgmt/portsdb/pkg-message8
5 files changed, 49 insertions, 0 deletions
diff --git a/ports-mgmt/Makefile b/ports-mgmt/Makefile
index 51e896237c60..5a0a863275b2 100644
--- a/ports-mgmt/Makefile
+++ b/ports-mgmt/Makefile
@@ -57,6 +57,7 @@
SUBDIR += portrac
SUBDIR += ports-tools
SUBDIR += portscout
+ SUBDIR += portsdb
SUBDIR += portsearch
SUBDIR += portshaker
SUBDIR += portshaker-config
diff --git a/ports-mgmt/portsdb/Makefile b/ports-mgmt/portsdb/Makefile
new file mode 100644
index 000000000000..4134a39bff3e
--- /dev/null
+++ b/ports-mgmt/portsdb/Makefile
@@ -0,0 +1,35 @@
+PORTNAME= portsdb
+DISTVERSION= 0.2
+CATEGORIES= ports-mgmt
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Program that imports the FreeBSD ports tree into an SQLite database
+WWW= https://github.com/yurivict/freebsd-portsdb
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= sqlite3:databases/sqlite3
+
+USE_GITHUB= yes
+GH_ACCOUNT= yurivict
+GH_PROJECT= freebsd-portsdb
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+PLIST_FILES= bin/portsdb-import \
+ libexec/${PORTNAME}/add-port-standalone.sh \
+ libexec/${PORTNAME}/add-port.sh \
+ libexec/${PORTNAME}/import.sh \
+ libexec/${PORTNAME}/schema.sql
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
+.for f in import.sh add-port.sh add-port-standalone.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/schema.sql ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
+ ${RLN} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/import.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-import
+
+.include <bsd.port.mk>
diff --git a/ports-mgmt/portsdb/distinfo b/ports-mgmt/portsdb/distinfo
new file mode 100644
index 000000000000..0840eb31d11a
--- /dev/null
+++ b/ports-mgmt/portsdb/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1669891315
+SHA256 (yurivict-freebsd-portsdb-0.2_GH0.tar.gz) = c2b8927a3b287731078dac3f24a47e2b23a0c9438e09b6644076d03364b5594f
+SIZE (yurivict-freebsd-portsdb-0.2_GH0.tar.gz) = 6423
diff --git a/ports-mgmt/portsdb/pkg-descr b/ports-mgmt/portsdb/pkg-descr
new file mode 100644
index 000000000000..8222419ff6bd
--- /dev/null
+++ b/ports-mgmt/portsdb/pkg-descr
@@ -0,0 +1,2 @@
+PortsDB is a program that imports the FreeBSD ports tree into an
+SQLite database.
diff --git a/ports-mgmt/portsdb/pkg-message b/ports-mgmt/portsdb/pkg-message
new file mode 100644
index 000000000000..378286bf37cb
--- /dev/null
+++ b/ports-mgmt/portsdb/pkg-message
@@ -0,0 +1,8 @@
+[
+{ type: install
+ message: <<EOM
+PortsDB needs this patch in the ports tree:
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268070
+EOM
+}
+]