openbsd-ports/databases/pgloader/Makefile
sthen af7f6e95fd update broken HOMEPAGE/MASTER_SITES for old pgfoundry ports.
add PORTROACH=site markers pointing at newer versions where I could find them.
2021-02-28 12:36:46 +00:00

56 lines
1.9 KiB
Makefile

# $OpenBSD: Makefile,v 1.16 2021/02/28 12:36:46 sthen Exp $
COMMENT= import CSV data and Large Object to PostgreSQL
PORTROACH= site:https://github.com/dimitri/pgloader/archive/
V= 2.3.2
DISTNAME= pgloader-$V
REVISION= 3
CATEGORIES= databases
HOMEPAGE= https://pgloader.io/
MAINTAINER= Pierre-Emmanuel Andre <pea@openbsd.org>
# BSD
PERMIT_PACKAGE= Yes
MASTER_SITES= https://ftp.postgresql.org/pub/projects/pgFoundry/pgloader/pgloader/$V/
MODULES= lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
RUN_DEPENDS= databases/py-psycopg2${MODPY_FLAVOR}
NO_BUILD= Yes
NO_TEST= Yes
EGGDIRS= allcols clob cluttered csv errors fixed parallel \
partial reformat serial simple udc
pre-configure:
@sed -i 's,/usr/bin/env python,${MODPY_BIN},' \
${WRKSRC}/pgloader.py
@sed -i 's,/usr/share/python-support,${MODPY_LIBDIR},' \
${WRKSRC}/pgloader/options.py
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/pgloader.py ${PREFIX}/bin/pgloader
${INSTALL_MAN} ${WRKSRC}/pgloader.1 ${PREFIX}/man/man1/
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pgloader
.for i in ${EGGDIRS}
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pgloader/${i}
${INSTALL_DATA} ${WRKSRC}/examples/${i}/* ${PREFIX}/share/examples/pgloader/${i}
.endfor
${INSTALL_DATA_DIR} ${WRKINST}/${MODPY_LIBDIR}/pgloader
${INSTALL_DATA_DIR} ${WRKINST}/${MODPY_LIBDIR}/pgloader/reformat
${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/share/doc/pgloader
${INSTALL_DATA} ${WRKSRC}/examples/README ${PREFIX}/share/examples/pgloader/
${INSTALL_DATA} ${WRKSRC}/examples/parallel.conf ${PREFIX}/share/examples/pgloader/
${INSTALL_DATA} ${WRKSRC}/examples/parallel.sections.conf ${PREFIX}/share/examples/pgloader/
${INSTALL_DATA} ${WRKSRC}/examples/pgloader.conf ${PREFIX}/share/examples/pgloader/
${INSTALL_DATA} ${WRKSRC}/pgloader/* ${WRKINST}/${MODPY_LIBDIR}/pgloader
${INSTALL_DATA} ${WRKSRC}/reformat/* ${WRKINST}/${MODPY_LIBDIR}/pgloader/reformat
.include <bsd.port.mk>