Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison Makefile @ 386:84d2735fe7f6
Simplified version tagging a lot: it is also faster now.
While being there: adjusting copyright year to end in 2023 now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 23 Feb 2023 01:08:31 +0100 |
| parents | d058f55fffea |
| children | 9921352225a9 |
comparison
equal
deleted
inserted
replaced
| 385:d058f55fffea | 386:84d2735fe7f6 |
|---|---|
| 33 HGREVISION= ${:!hg id -R "${SRC}" -q!} | 33 HGREVISION= ${:!hg id -R "${SRC}" -q!} |
| 34 HGDATE= ${:!hg log -R "${SRC}" -r "${HGREVISION:S/+//}" --template '{date|isodatesec}'!} | 34 HGDATE= ${:!hg log -R "${SRC}" -r "${HGREVISION:S/+//}" --template '{date|isodatesec}'!} |
| 35 HGAUTHOR= ${:!hg log -R "${SRC}" -r "${HGREVISION:S/+//}" --template '{author|person}' | ${TR} ' ' '+'!} | 35 HGAUTHOR= ${:!hg log -R "${SRC}" -r "${HGREVISION:S/+//}" --template '{author|person}' | ${TR} ' ' '+'!} |
| 36 HGPATH= ${:!hg --config ui.paginate=never path -R "${SRC}" ${HGCANONICALPATH} || echo "file://\$$\(hg root)"!} | 36 HGPATH= ${:!hg --config ui.paginate=never path -R "${SRC}" ${HGCANONICALPATH} || echo "file://\$$\(hg root)"!} |
| 37 HGPHASE= ${:!hg phase!:[2]} | 37 HGPHASE= ${:!hg phase!:[2]} |
| 38 SIMPLEVERSIONSTR= v${PKGVERSION} (rv:${HGREVISION}) | |
| 39 SIMPLEVERSIONTAG= ${PKGORIGIN} v${PKGVERSION} (rv:${HGREVISION}) | |
| 40 VERSIONTAG= ${PKGORIGIN} v${PKGVERSION} (rv:${HGREVISION} with repo at ${HGPATH}) | |
| 38 | 41 |
| 39 do-extract: | 42 do-extract: |
| 40 ${MKDIR} ${WRKSRC}/bin | 43 ${MKDIR} ${WRKSRC}/bin |
| 41 ${MKDIR} ${WRKSRC}/sbin | 44 ${MKDIR} ${WRKSRC}/sbin |
| 42 ${CP} Makefile ${WRKSRC}/Makefile | 45 ${CP} Makefile ${WRKSRC}/Makefile |
| 43 .for _rp in sbin/check-ports sbin/fjail sbin/ftjail sbin/fzfs sbin/fpkg sbin/bsmtp2dma | 46 .for _rp in sbin/check-ports sbin/fjail sbin/ftjail sbin/fzfs sbin/fpkg sbin/bsmtp2dma |
| 44 ${CP} -v ${SRC}/${_rp} ${WRKSRC}/${_rp} | 47 ${CP} -v ${SRC}/${_rp} ${WRKSRC}/${_rp} |
| 45 ${SED} -i "" -E -e "s|\\\$$Date\\\$$|\$$Date: ${HGDATE} \$$|" ${WRKSRC}/${_rp} | |
| 46 ${SED} -i "" -E -e "s|\\\$$Revision\\\$$|\$$Revision: ${HGREVISION} \$$|" ${WRKSRC}/${_rp} | |
| 47 ${SED} -i "" -E -e "s|\\\$$Author\\\$$|\$$Author: ${HGAUTHOR} \$$|" ${WRKSRC}/${_rp} | |
| 48 ${SED} -i "" -e "s|\\\$$HGpath\\\$$|\$$HGpath: ${HGPATH} \$$|" ${WRKSRC}/${_rp} | |
| 49 ${SED} -i "" -e "s|\\\$$HGsource\\\$$|\$$HGsource: ${HGPATH}/${_rp} \$$|" ${WRKSRC}/${_rp} | |
| 50 ${SED} -i "" -e "s|\\\$$Header\\\$$|\$$Header: ${_rp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/${_rp} | |
| 51 ${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/${_rp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/${_rp} | |
| 52 ${SED} -i "" -e "s|@@VERSION@@|${PORTVERSION}|" ${WRKSRC}/${_rp} | 48 ${SED} -i "" -e "s|@@VERSION@@|${PORTVERSION}|" ${WRKSRC}/${_rp} |
| 53 ${SED} -i "" -e "s|@@HGREVISION@@|${HGREVISION}|" ${WRKSRC}/${_rp} | |
| 54 ${SED} -i "" -e "s|@@ETCDIR@@|${ETCDIR}|" ${WRKSRC}/${_rp} | 49 ${SED} -i "" -e "s|@@ETCDIR@@|${ETCDIR}|" ${WRKSRC}/${_rp} |
| 55 ${SED} -i "" -e "s|@@PKGORIGIN@@|${PKGORIGIN}|" ${WRKSRC}/${_rp} | 50 ${SED} -i "" -e "s|@@VERSIONTAG@@|${VERSIONTAG}|" ${WRKSRC}/${_rp} |
| 51 ${SED} -i "" -e "s|@@SIMPLEVERSIONTAG@@|${SIMPLEVERSIONTAG}|" ${WRKSRC}/${_rp} | |
| 52 ${SED} -i "" -e "s|@@SIMPLEVERSIONSTR@@|${SIMPLEVERSIONSTR}|" ${WRKSRC}/${_rp} | |
| 56 .endfor | 53 .endfor |
| 57 ${MKDIR} ${WRKSRC}/etc/periodic/daily | 54 ${MKDIR} ${WRKSRC}/etc/periodic/daily |
| 58 .for _ef in etc/package-mapping.conf.sample etc/pkgtools.conf.sample etc/bsmtp2dma.conf.sample etc/periodic/daily/800.local-ipv6-refresh etc/periodic/daily/750.local-trim-zfs | 55 .for _ef in etc/package-mapping.conf.sample etc/pkgtools.conf.sample etc/bsmtp2dma.conf.sample etc/periodic/daily/800.local-ipv6-refresh etc/periodic/daily/750.local-trim-zfs |
| 59 ${CP} -v ${SRC}/${_ef} ${WRKSRC}/${_ef} | 56 ${CP} -v ${SRC}/${_ef} ${WRKSRC}/${_ef} |
| 60 ${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/${_ef} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/${_ef} | 57 ${SED} -i "" -e "s|@@SIMPLEVERSIONTAG@@|${SIMPLEVERSIONTAG}|" ${WRKSRC}/${_ef} |
| 61 ${SED} -i "" -e "s|@@PKGORIGIN@@|${PKGORIGIN}|" ${WRKSRC}/${_ef} | |
| 62 .endfor | 58 .endfor |
| 63 | 59 |
| 64 post-extract-DOCS-on: | 60 post-extract-DOCS-on: |
| 65 ${MKDIR} ${WRKSRC}/docs | 61 ${MKDIR} ${WRKSRC}/docs |
| 66 (${TAR} -C ${.CURDIR}/docs -c --exclude ./_build -f - . | ${TAR} -C ${WRKSRC}/docs -x -f - ) | 62 (${TAR} -C ${.CURDIR}/docs -c --exclude ./_build -f - . | ${TAR} -C ${WRKSRC}/docs -x -f - ) |
| 67 .for _mp in man/man8/local-bsdtools.rst | 63 .for _mp in man/man8/local-bsdtools.rst |
| 68 ${SED} -i "" -e "s|@@PKGORIGIN@@|${PKGORIGIN}|" ${WRKSRC}/docs/${_mp} | 64 ${SED} -i "" -e "s|@@SIMPLEVERSIONTAG@@|${SIMPLEVERSIONTAG}|" ${WRKSRC}/docs/${_mp} |
| 69 ${SED} -i "" -e "s|@@VERSION@@|${PORTVERSION}|" ${WRKSRC}/docs/${_mp} | |
| 70 ${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/docs/${_mp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/docs/${_mp} | 65 ${SED} -i "" -e "s|\\\$$HGid\\\$$|\$$HGid: ${HGPATH}/docs/${_mp} ${HGREVISION} ${HGDATE} ${HGAUTHOR} ${HGPHASE} \$$|" ${WRKSRC}/docs/${_mp} |
| 71 .endfor | 66 .endfor |
| 72 | 67 |
| 73 .if ${PORT_OPTIONS:MDOCS} | 68 .if ${PORT_OPTIONS:MDOCS} |
| 74 do-build: | 69 do-build: |
