From 9be8ae984b713a9f8f57eefe138d6f373c750da8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 24 May 2020 04:28:20 +0000 Subject: experimental/horizon: New package --- experimental/horizon/APKBUILD | 100 ++++++++++++++++++++++++++++ experimental/horizon/noninstall-mount.patch | 61 +++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 experimental/horizon/APKBUILD create mode 100644 experimental/horizon/noninstall-mount.patch (limited to 'experimental') diff --git a/experimental/horizon/APKBUILD b/experimental/horizon/APKBUILD new file mode 100644 index 000000000..9c1d39ee7 --- /dev/null +++ b/experimental/horizon/APKBUILD @@ -0,0 +1,100 @@ +# Contributor: A. Wilcox +# Maintainer: A. Wilcox +pkgname=horizon +pkgver=0.9.0 +pkgrel=0 +pkgdesc="Installation tools for Adélie Linux" +url="https://horizon.adelielinux.org/" +arch="all" +options="!check" # Unpackaged dependency ruby-aruba. +license="AGPL-3.0+" +depends="" +checkdepends="ruby-aruba ruby-rspec valgrind" +# Second group is the Qt5 UI deps. +makedepends="bcnm-dev boost-dev cmake curl-dev eudev-dev libarchive-dev + linux-headers parted-dev skalibs-dev util-linux-dev + + libcap-dev libx11-dev libxkbfile-dev qt5-qtbase-dev" +subpackages="$pkgname-dev $pkgname-doc $pkgname-image $pkgname-qt5 + $pkgname-tools $pkgname-wizard" +source="https://distfiles.adelielinux.org/source/horizon-$pkgver.tar.xz + noninstall-mount.patch + " + +build() { + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=True \ + -DBUILD_TOOLS=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-format-truncation" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DINSTALL=ON \ + ${CMAKE_CROSSOPTS} \ + -Bbuild + make -C build + + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=False \ + -DBUILD_TOOLS=OFF \ + -DBUILD_UI=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-format-truncation" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DINSTALL=OFF \ + ${CMAKE_CROSSOPTS} \ + -Bbuild-wizard + make -C build-wizard +} + +check() { + CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test +} + +package() { + make DESTDIR="$pkgdir" -C build install +} + +image() { + pkgdesc="Tools for generating images using HorizonScript" + mkdir -p "$subpkgdir"/usr/bin + mkdir -p "$subpkgdir"/usr/lib + + mv "$pkgdir"/usr/bin/hscript-image "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/lib/libhi-backends.so "$subpkgdir"/usr/lib/ +} + +qt5() { + pkgdesc="Qt 5 installation wizard for Adélie Linux" + mkdir -p "$subpkgdir"/usr/bin + + for _bin in horizon-ppc64-detect horizon-qt5 horizon-run-qt5; do + mv "$pkgdir"/usr/bin/$_bin "$subpkgdir"/usr/bin/ + done +} + +tools() { + pkgdesc="Tools for authoring HorizonScript files" + mkdir -p "$subpkgdir"/usr/bin + + for _bin in hscript-fromjson hscript-simulate hscript-validate; do + mv "$pkgdir"/usr/bin/$_bin "$subpkgdir"/usr/bin/ + done +} + +wizard() { + pkgdesc="Wizard to generate a HorizonScript for another computer" + + make DESTDIR="$subpkgdir" -C "$builddir"/build-wizard install + rm "$subpkgdir"/usr/bin/hscript-printowner + rm -r "$subpkgdir"/usr/include + rm -r "$subpkgdir"/usr/lib + rm -r "$subpkgdir"/usr/share +} + +sha512sums="a2185744b611154f41ba433399f621c8114147bc981dad03fac581bf7ddd67c46042bc230fd68d4c89188cefa281022d101d7394cf1a0554729da540706e6216 horizon-0.9.0.tar.xz +44a4f022df03a3ac3ec9fe3aea9faa8d98ed6c9b61ff50e3c363f5691a2ed428d328f6d5aa019f25be67811dede8da7195eaf354f1cd3a4a56c77f698d53e7fb noninstall-mount.patch" diff --git a/experimental/horizon/noninstall-mount.patch b/experimental/horizon/noninstall-mount.patch new file mode 100644 index 000000000..2b0e7152a --- /dev/null +++ b/experimental/horizon/noninstall-mount.patch @@ -0,0 +1,61 @@ +diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc +index 143ae43..556a6f3 100644 +--- a/ui/qt5/horizonwizard.cc ++++ b/ui/qt5/horizonwizard.cc +@@ -542,7 +542,9 @@ QString HorizonWizard::toHScript() { + break; + } + ++#ifdef HAS_INSTALL_ENV + part_lines << (dynamic_cast(page(Page_PartitionMount)))->mountLines(); ++#endif /* HAS_INSTALL_ENV */ + + if(chosen_disk.empty()) { + lines << part_lines; +diff --git a/ui/qt5/mountdialog.cc b/ui/qt5/mountdialog.cc +index f986423..103e442 100644 +--- a/ui/qt5/mountdialog.cc ++++ b/ui/qt5/mountdialog.cc +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + + MountDialog::MountDialog(QStringList skipParts, QStringList skipMounts, +@@ -75,7 +76,11 @@ MountDialog::MountDialog(QStringList skipParts, QStringList skipMounts, + + QVBoxLayout *controlLayout = new QVBoxLayout; + controlLayout->addWidget(new QLabel(tr("Partition"))); ++#ifdef HAS_INSTALL_ENV + controlLayout->addWidget(partList); ++#else /* !HAS_INSTALL_ENV */ ++ controlLayout->addWidget(partInput); ++#endif /* HAS_INSTALL_ENV */ + controlLayout->addWidget(new QLabel(tr("will be mounted on"))); + controlLayout->addWidget(pathInput); + +@@ -87,14 +92,22 @@ MountDialog::MountDialog(QStringList skipParts, QStringList skipMounts, + } + + QString MountDialog::partition() const { ++#ifdef HAS_INSTALL_ENV + assert(partList->currentItem() != nullptr); + return partList->currentItem()->text(); ++#else /* !HAS_INSTALL_ENV */ ++ return partInput->text(); ++#endif /* HAS_INSTALL_ENV */ + } + + void MountDialog::setPartition(const QString &part) { ++#ifdef HAS_INSTALL_ENV + QList candidate = partList->findItems(part, Qt::MatchExactly); + if(candidate.empty()) return; + partList->setCurrentItem(candidate.at(0)); ++#else /* !HAS_INSTALL_ENV */ ++ partInput->setText(part); ++#endif /* HAS_INSTALL_ENV */ + } + + QString MountDialog::mountPoint() const { -- cgit v1.2.3-60-g2f50