aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/feather/Makefile
blob: 86bf8e68b91a2e7c6a5ffdf68655e810f05f4bae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Created by: Greg Larkin <glarkin@FreeBSD.org>
# $FreeBSD$

PORTNAME=   feather
PORTVERSION=    1.0
CATEGORIES= sysutils python
MASTER_SITES=   http://www.sourcehosting.net/freebsd/distfiles/ \
        LOCAL/glarkin

MAINTAINER= glarkin@FreeBSD.org
COMMENT=    A Python script for managing tarsnap backups

RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}yaml>=0:${PORTSDIR}/devel/py-yaml \
        tarsnap>=0:${PORTSDIR}/sysutils/tarsnap

USE_PYTHON= 2.5+
NO_BUILD=   yes
NO_INSTALL= yes
STRIP=

SUB_FILES=  pkg-message

NO_STAGE=   yes
do-install:
    @${INSTALL_PROGRAM} ${WRKSRC}/feather ${PREFIX}/bin
    @${INSTALL_DATA} ${WRKSRC}/feather.yaml.dist ${PREFIX}/etc
.if !defined(NOPORTDOCS)
    @${INSTALL} -d ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

x-generate-tarball:
    ${SETENV} ${FETCH_ENV} ${FETCH_BINARY} -m -o ${PORTNAME}.tar.gz \
        https://github.com/danrue/${PORTNAME}/tarball/master
    target=`${TAR} -tvf ${PORTNAME}.tar.gz | head -n 1`; \
    dir=`${ECHO} $${target} | ${AWK} '{print $$9}' | ${SED} -e 's|/$$||'`; \
    ${TAR} -zxf ${PORTNAME}.tar.gz; \
    ${RM} ${PORTNAME}.tar.gz; \
    ${MV} $${dir} ${PORTNAME}-${PORTVERSION}; \
    ${TAR} -zcf ${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-${PORTVERSION}; \
    ${RM} -r ${PORTNAME}-${PORTVERSION}

.include <bsd.port.mk>