OSDN Git Service

[add] : Added alterlinux-calamares-git
authorhayao <shun819.mail@gmail.com>
Thu, 5 Mar 2020 12:27:27 +0000 (21:27 +0900)
committerhayao <shun819.mail@gmail.com>
Thu, 5 Mar 2020 12:27:27 +0000 (21:27 +0900)
unstable/alterlinux-calamares-git/PKGBUILD [new file with mode: 0644]

diff --git a/unstable/alterlinux-calamares-git/PKGBUILD b/unstable/alterlinux-calamares-git/PKGBUILD
new file mode 100644 (file)
index 0000000..7fb31de
--- /dev/null
@@ -0,0 +1,72 @@
+# Maintainer: Yamada Hayao <hayao@fascode.net>
+
+pkgname=alterlinux-calamares
+pkgver=v3.2.18.r447.gb9419faa8
+pkgrel=1
+pkgdesc='Distribution-independent installer framework'
+arch=('i686' 'x86_64')
+license=(GPL)
+url="https://github.com/SereneTeam/alterlinux-calamares"
+license=('LGPL')
+depends=('kconfig' 'kcoreaddons' 'kiconthemes' 'ki18n' 'kio' 'solid' 'yaml-cpp' 'kpmcore'
+         'boost-libs' 'hwinfo' 'qt5-svg' 'polkit-qt5' 'gtk-update-icon-cache' 'plasma-framework'
+         'qt5-xmlpatterns' 'squashfs-tools') # 'pythonqt>=3.2')
+makedepends=('extra-cmake-modules' 'qt5-tools' 'qt5-translations' 'git' 'boost')
+backup=('usr/share/calamares/modules/bootloader.conf'
+        'usr/share/calamares/modules/displaymanager.conf'
+        'usr/share/calamares/modules/initcpio.conf'
+        'usr/share/calamares/modules/unpackfs.conf')
+
+# source+=("$url/archive/$pkgver-$pkgrel.tar.gz")
+source=('git+https://github.com/SereneTeam/alterlinux-calamares.git')
+#source+=("$url/archive/$pkgver.tar.gz")
+
+sha256sums=('SKIP')
+
+pkgver() {
+    cd "$pkgname"
+    git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+    cd ${srcdir}/${pkgname}
+    sed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' CMakeLists.txt
+
+    # change branding
+    sed -i -e "s/default/alter/g" src/branding/CMakeLists.txt
+}
+
+build() {
+    cd ${srcdir}/${pkgname}
+
+    mkdir -p build
+    cd build
+        cmake .. \
+              -DCMAKE_BUILD_TYPE=Debug \
+              -DCMAKE_INSTALL_PREFIX=/usr \
+              -DCMAKE_INSTALL_LIBDIR=lib \
+              -DWITH_PYTHONQT:BOOL=ON \
+              -DBoost_NO_BOOST_CMAKE=ON \
+              -DSKIP_MODULES="tracking webview interactiveterminal initramfs \
+                              initramfscfg dracut dracutlukscfg \
+                              dummyprocess dummypython dummycpp \
+                              dummypythonqt services-openrc"
+        make
+}
+
+package() {
+    cd ${srcdir}/${pkgname}/build
+    make DESTDIR="$pkgdir" install
+    install -Dm755 "../data/final-process" "$pkgdir/usr/share/calamares/final-process"
+    install -Dm644 "../data/alter-icon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/calamares.svg"
+    install -Dm644 "../data/calamares.desktop" "$pkgdir/usr/share/applications/calamares.desktop"
+    install -Dm755 "../data/calamares_polkit" "$pkgdir/usr/bin/calamares_polkit"
+    install -Dm644 "../data/49-nopasswd-calamares.rules" "$pkgdir/etc/polkit-1/rules.d/49-nopasswd-calamares.rules"
+    chmod 750      "$pkgdir"/etc/polkit-1/rules.d
+
+    # rename services-systemd back to services
+    mv "$pkgdir/usr/lib/calamares/modules/services-systemd" "$pkgdir/usr/lib/calamares/modules/services"
+    mv "$pkgdir/usr/share/calamares/modules/services-systemd.conf" "$pkgdir/usr/share/calamares/modules/services.conf"
+    sed -i -e 's/-systemd//' "$pkgdir/usr/lib/calamares/modules/services/module.desc"
+    sed -i -e 's/-systemd//' "$pkgdir/usr/share/calamares/settings.conf"
+}