pkgsrc/sysutils/sysbuild/Makefile

95 lines
2.7 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.23 2012/10/23 19:51:25 asau Exp $
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
DISTNAME= sysbuild-2.4
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= jmmv@NetBSD.org
COMMENT= Automates builds of NetBSD and manages source trees
LICENSE= modified-bsd
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
NO_CONFIGURE= YES
BUILD_SUBST= -e 's,@SYSBUILD_BINDIR@,${PREFIX}/bin,g'
BUILD_SUBST+= -e 's,@SYSBUILD_EGDIR@,${EGDIR},g'
BUILD_SUBST+= -e 's,@SYSBUILD_ETCDIR@,${PKG_SYSCONFDIR},g'
BUILD_SUBST+= -e 's,@SYSBUILD_SHAREDIR@,${PREFIX}/share/sysbuild,g'
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
PKG_SYSCONFSUBDIR= sysbuild
EGDIR= ${PREFIX}/share/examples/sysbuild
CONF_FILES+= ${EGDIR}/default.conf ${PKG_SYSCONFDIR}/default.conf
PKG_OPTIONS_VAR= PKG_OPTIONS.sysbuild
PKG_SUPPORTED_OPTIONS= tests
PKG_SUGGESTED_OPTIONS= tests
.include "../../mk/bsd.options.mk"
.if $(PKG_OPTIONS:Mtests)
TEST_PROGS= sysbuild_test sysbuild4cron_test
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
PLIST_SUBST+= TESTS=
. include "../../devel/atf-libs/buildlink3.mk"
BUILD_SUBST+= -e 's,@ATF_SH@,${BUILDLINK_PREFIX.atf-libs}/bin/atf-sh,g'
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
do-build: build-tests
build-tests:
cp ${FILESDIR}/Kyuafile ${WRKSRC}
.for file in ${TEST_PROGS}
sed ${BUILD_SUBST} <${FILESDIR}/${file}.sh >${WRKSRC}/${file}
chmod +x ${WRKSRC}/${file}
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
.endfor
INSTALLATION_DIRS+= tests/sysbuild
do-install: install-tests
install-tests:
${INSTALL_DATA} ${WRKSRC}/Kyuafile ${DESTDIR}${PREFIX}/tests/sysbuild
.for file in ${TEST_PROGS}
${INSTALL_SCRIPT} ${WRKSRC}/${file} ${DESTDIR}${PREFIX}/tests/sysbuild/
.endfor
do-test:
cd ${WRKSRC} && PATH="${WRKSRC}:${PATH}" \
SYSBUILD_SHAREDIR="${WRKSRC}" kyua test
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
.else
PLIST_SUBST+= TESTS=@comment
.endif
do-build:
.for file in sysbuild sysbuild4cron
sed ${BUILD_SUBST} ${FILESDIR}/${file}.sh \
| ${BUILDLINK_PREFIX.shtk}/bin/shtk build \
-s ${SH} -m ${file}_main -o ${WRKSRC}/${file} -
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
.endfor
.for file in sysbuild.1 sysbuild4cron.1 sysbuild.conf.5 default.conf
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
sed ${BUILD_SUBST} <${FILESDIR}/${file} >${WRKSRC}/${file}
.endfor
cp ${FILESDIR}/env.sh ${WRKSRC}
chmod +x ${WRKSRC}/env.sh
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 \
share/examples/sysbuild share/sysbuild
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/sysbuild ${DESTDIR}${PREFIX}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/sysbuild4cron ${DESTDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/sysbuild.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
${INSTALL_MAN} ${WRKSRC}/sysbuild4cron.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
${INSTALL_MAN} ${WRKSRC}/sysbuild.conf.5 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
.for file in default.conf
${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR}${EGDIR}
.endfor
${INSTALL_SCRIPT} ${WRKSRC}/env.sh ${DESTDIR}${PREFIX}/share/sysbuild
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
.include "../../devel/shtk/buildlink3.mk"
Initial (re)addition of sysbuild, version 2.0: sysbuild is a tool to automate the maintenance of the NetBSD sources and the build of releases by means of a single command and a configuration file that tells sysbuild what to do. Since NetBSD 1.6 (released on July 2011), the source tree has included a very flexible script (build.sh) to build a full NetBSD release for the current platform or to cross-build for any of the supported platforms. The flipside of the flexibility is that the script is inconvenient to use on a daily basis because of the myriad of options it takes. Furthermore, managing the source trees that make up NetBSD is not in the scope of build.sh: the user must fetch these trees and keep them up to date by hand. While these details are all fine on their own, rebuilding NetBSD frequently (to keep a system up to date, or just for development tasks) is convoluted. Developers and users usually find themselves writing their own wrapper scripts over build.sh to simplify their daily tasks. sysbuild extends build.sh by adding support for configuration files and source tree management, allowing NetBSD rebuilds with a single and simple command. Make sure to check the sysbuild-user package for a way to trivially set up periodic NetBSD rebuilds under an dedicated, unprivileged user. This is version 2.0 because sysbuild already existed 10 years ago. It served the same purpose, but it was removed because it stopped working with NetBSD 2.0 (can't remember why though). Also, I'm convinced the previous implementation was quite bad.
2012-07-25 14:18:22 +02:00
.include "../../mk/bsd.pkg.mk"