blob: 437005b15a5e4bb698e38cb377b495268dc73872 (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# $NetBSD: Makefile,v 1.2 2021/11/23 07:30:52 pho Exp $
DISTNAME= yadm-3.1.1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=TheLocehiliosan/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://yadm.io/
COMMENT= Yet Another Dotfiles Manager
LICENSE= gnu-gpl-v3
USE_TOOLS+= bash:run gawk:run pax tar:run
NO_BUILD= yes
DEPENDS+= git-base-[0-9]*:../../devel/git-base
# yadm by default initially launches as a /bin/sh script and then
# exec's bash that happens to be in $PATH. Prevent it from doing that.
REPLACE_BASH+= yadm
# Embed paths to external programs and don't try to find ones in $PATH.
YADM_PROGS= # empty
YADM_PROGS+= GIT_PROGRAM="${PREFIX:Q}/bin/git"
YADM_PROGS+= AWK_PROGRAM=("${TOOLS_PATH.gawk:Q}")
# These programs are not in pkgsrc (yet).
YADM_PROGS+= GIT_CRYPT_PROGRAM="/nonexistent"
YADM_PROGS+= TRANSCRYPT_PROGRAM="/nonexistent"
YADM_PROGS+= J2CLI_PROGRAM="/nonexistent"
YADM_PROGS+= ENVTPL_PROGRAM="/nonexistent"
YADM_PROGS+= ESH_PROGRAM="/nonexistent"
SUBST_CLASSES+= progs
SUBST_STAGE.progs= pre-configure
SUBST_FILES.progs= yadm
# We can't use .for here, because variables like TOOLS_PATH.* are not
# defined yet. Even bsd.prefs.mk doesn't define them.
SUBST_SED.progs+= ${YADM_PROGS:@pair@-e 's|${pair:C/=.*//}=.*$$|${pair}|'@}
# These scripts are intended to be copied into yadm repositories which
# can possibly be cloned onto systems without pkgsrc. It is therefore
# inappropriate to use pkgsrc-specific interpreter paths.
REPLACE_INTERPRETER+= env-bash
REPLACE.env-bash.old= .*bash
REPLACE.env-bash.new= ${TOOLS_PATH.env} bash
REPLACE_FILES.env-bash= contrib/bootstrap/bootstrap-in-dir
REPLACE_FILES.env-bash+= contrib/hooks/parsing_full_command_example/pre_log
.include "options.mk"
INSTALLATION_DIRS+= bin
INSTALLATION_DIRS+= ${PKGMANDIR}/man1
INSTALLATION_DIRS+= share/bash-completion/completions
INSTALLATION_DIRS+= share/fish/completions
INSTALLATION_DIRS+= share/zsh/site-functions
INSTALLATION_DIRS+= share/doc/yadm
INSTALLATION_DIRS+= share/examples/yadm
do-install:
${INSTALL_SCRIPT} \
"${WRKSRC}/yadm" \
"${DESTDIR}${PREFIX}/bin/"
${INSTALL_MAN} \
"${WRKSRC}/yadm.1" \
"${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/"
${INSTALL_DATA} \
"${WRKSRC}/completion/bash/yadm" \
"${DESTDIR}${PREFIX}/share/bash-completion/completions/"
${INSTALL_DATA} \
"${WRKSRC}/completion/fish/yadm.fish" \
"${DESTDIR}${PREFIX}/share/fish/completions/"
${INSTALL_DATA} \
"${WRKSRC}/completion/zsh/_yadm" \
"${DESTDIR}${PREFIX}/share/zsh/site-functions/"
for f in CHANGES CONTRIBUTORS LICENSE README.md; do \
${INSTALL_DATA} \
"${WRKSRC}/$${f}" \
"${DESTDIR}${PREFIX}/share/doc/yadm/"; \
done
cd "${WRKSRC}/contrib" && \
${PAX} -wr . "${DESTDIR}${PREFIX}/share/examples/yadm"
.include "../../mk/bsd.pkg.mk"
|