From 2e019b5e257bd06194c18e5f4206ad78fd23197d Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 10 Jul 2006 10:57:59 +0000 Subject: [PATCH] package the database built from ports for any user. --- databases/sqlports/Makefile | 26 ++++++++++++++ databases/sqlports/distinfo | 0 databases/sqlports/pkg/DESCR | 68 ++++++++++++++++++++++++++++++++++++ databases/sqlports/pkg/PLIST | 2 ++ 4 files changed, 96 insertions(+) create mode 100644 databases/sqlports/Makefile create mode 100644 databases/sqlports/distinfo create mode 100644 databases/sqlports/pkg/DESCR create mode 100644 databases/sqlports/pkg/PLIST diff --git a/databases/sqlports/Makefile b/databases/sqlports/Makefile new file mode 100644 index 00000000000..6a7f2ef5019 --- /dev/null +++ b/databases/sqlports/Makefile @@ -0,0 +1,26 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2006/07/10 10:57:59 espie Exp $ + +CATEGORIES= databases +DISTNAME= sqlports-0.0 +DISTFILES= +COMMENT= 'sqlite database of ports' +MAINTAINER= Marc Espie + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +DBNAME= ${WRKBUILD}/sqlports + +do-build: + cd ${PORTSDIR} && ${MAKE} dump-vars| \ + perl ${PORTSDIR}/infrastructure/package/mksqlitedb ${DBNAME} + +do-install: + ${INSTALL_DATA} ${DBNAME} ${PREFIX}/share + +BUILD_DEPENDS= ::databases/p5-DBD-SQLite +NO_REGRESS= Yes + +.include diff --git a/databases/sqlports/distinfo b/databases/sqlports/distinfo new file mode 100644 index 00000000000..e69de29bb2d diff --git a/databases/sqlports/pkg/DESCR b/databases/sqlports/pkg/DESCR new file mode 100644 index 00000000000..b9384108f4e --- /dev/null +++ b/databases/sqlports/pkg/DESCR @@ -0,0 +1,68 @@ +SQLite database of every port in the system. This can be queried through +e.g., sqlitebrowser, or any kind of programming interface. + +Database Schema: +- Ports(PKGPATH, ...) +holds all the information retrieved through various variables, e.g.,: + AUTOCONF_VERSION + AUTOMAKE_VERSION + BROKEN + *DEPENDS + CATEGORIES + COMMENT + CONFIGURE_STYLE + DESCR + PACKAGING + DISTFILES + DISTNAME + DIST_SUBDIR + FLAVORS + HOMEPAGE + IS_INTERACTIVE + MAINTAINER + MASTER_SITES* + MODULES + MULTI_PACKAGES + NO_* + ONLY_FOR_ARCHS + PACKAGES + PERMIT_* + PKGNAME + PKG_ARCH + PSEUDO_FLAVORS + REGRESS_IS_INTERACTIVE + RUN_DEPENDS + SEPARATE_BUILD + SHARED_LIBS + SHARED_ONLY + SUBPACKAGE + SUPDISTFILES + USE_* + WANTLIB +This information is mostly unchanged, except for replacing Yes/No variables +with 1/0. Variables not present in a given port are left undefined. + +The PKGPATH is complete, including flavors markers. For each port with +MULTI_PACKAGES setting, another entry is written with PACKAGING set, and +the correct SUBPACKAGE. + +- Flavors(PKGPATH, VALUE) +- Categories(PKGPATH, VALUE) +- Multi(PKGPATH, VALUE) +- Modules(PKGPATH, VALUE) +- Configure(PKGPATH, VALUE) +All of these values are actually lists. After disassembling the list, +one can find many entries in these secondary tables. + +- Depends(PKGPATH, FULLDEPENDS, DEPENDSPATH, TYPE) +All depends are stored in a single table, including the type: +R -> run +L -> lib +B -> build +Regress -> regress +with FULLDEPENDS the full text of the dependency, and DEPENDSPATH the PKGPATH +we depend upon. +- Wantlib(PKGPATH, VALUE) +All the libraries the PKGPATH depends upon, with and without version number, +coming from either the WANTLIB variable or various LIB_DEPENDS. + diff --git a/databases/sqlports/pkg/PLIST b/databases/sqlports/pkg/PLIST new file mode 100644 index 00000000000..e95f61bc20e --- /dev/null +++ b/databases/sqlports/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2006/07/10 10:57:59 espie Exp $ +share/sqlports