I want to install a zip file that does not extract to a subdirectory. According to the docs I have to use
So how do I solve this? Solutions that came to my mind:
- Extract the zip somewhere else. I haven't found anything that would allow me to do this.
- Move the files after extracting them. Not so great.
- Exclude ${STAGEDIR} when copying. Even worse.
So is there any better method?
Find my Makefile below, but be aware that it may mess up your file system. This is my first port, any feedback is greatly appreciated!
Oh, and is ${PREFIX} also the path where dependencies are installed? I have to pass it to
NO_WRKSUBDIR= yes in such a case. Since it's an web application, I want to copy all files from ${WRKSRC} to ${STAGEDIR}${WWWDIR}; however this is is a mess because ${WRKSRC} contains ${STAGEDIR}.So how do I solve this? Solutions that came to my mind:
- Extract the zip somewhere else. I haven't found anything that would allow me to do this.
- Move the files after extracting them. Not so great.
- Exclude ${STAGEDIR} when copying. Even worse.
So is there any better method?
Find my Makefile below, but be aware that it may mess up your file system. This is my first port, any feedback is greatly appreciated!
Code:
# $FreeBSD$
PORTNAME= ghost
PORTVERSION= 0.3.3
CATEGORIES= www
MASTER_SITES= http://ghost.org/archives/
MAINTAINER= jakob@gillich.me
COMMENT= Simple blogging platform
LICENSE= MIT
RUN_DEPENDS= node:${PORTSDIR}/www/node
BUILD_DEPENDS= ${RUN_DEPENDS} \
npm:${PORTSDIR}/www/npm
USE_ZIP= yes
NO_WRKSUBDIR= yes
NO_BUILD= yes
OPTIONS_MULTI= DB
OPTIONS_MULTI_DB= MYSQL PGSQL SQLITE
OPTIONS_DEFAULT= SQLITE
MYSQL_USE= MYSQL=client
PGSQL_USE= PGSQL=yes
SQLITE_USE= SQLITE=yes
do-install:
${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}
cd ${WRKSRC} && npm install --sqlite=${PREFIX}
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
.include <bsd.port.mk>
Oh, and is ${PREFIX} also the path where dependencies are installed? I have to pass it to
npm install due to an issue with node-sqlite.