mirror of
https://abf.rosa.ru/djam/calamares.git
synced 2025-02-23 15:42:49 +00:00
289 lines
9.4 KiB
RPMSpec
289 lines
9.4 KiB
RPMSpec
%define major %{version}.0
|
|
%define libname %mklibname %{name} %{major}
|
|
%define libnameui %mklibname %{name}ui %{major}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
Summary: Distribution-independent installer framework
|
|
Name: calamares
|
|
Version: 2.3
|
|
Release: 4
|
|
License: GPLv3+
|
|
Group: System/Configuration/Other
|
|
Url: http://calamares.io/
|
|
Source0: calamares-%{version}.tar.gz
|
|
Source2: calamares.rpmlintrc
|
|
Source3: %{name}.service
|
|
Source4: %{name}.target
|
|
Source5: %{name}-install-start
|
|
Source6: %{name}-install-setup
|
|
Source7: rosa-bootloader.conf
|
|
Source8: rosa-displaymanager.conf
|
|
Source9: rosa-finished.conf
|
|
Source10: rosa-fstab.conf
|
|
Source11: rosa-grubcfg.conf
|
|
Source12: rosa-keyboard.conf
|
|
Source13: rosa-locale.conf
|
|
Source14: rosa-machineid.conf
|
|
Source15: rosa-mount.conf
|
|
Source16: rosa-packages.conf
|
|
Source17: rosa-welcome.conf
|
|
Source18: rosa-services.conf
|
|
Source19: rosa-settings.conf
|
|
Source20: rosa-unpackfs.conf
|
|
Source21: rosa-users.conf
|
|
Source22: rosa-partition.conf
|
|
Source23: rosa-removeuser.conf
|
|
Source24: rosa-webview.conf
|
|
Source100: rosa-adverts-en.tar.bz2
|
|
Source101: rosa-adverts-ru.tar.bz2
|
|
Patch0: calamares-1.1.4.2-polkit-qt5.patch
|
|
Patch1: calamares-2.2.3-desktop-file.patch
|
|
Patch2: calamares-libparted-detection.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: extra-cmake-modules
|
|
BuildRequires: boost-devel
|
|
BuildRequires: boost-python3-devel
|
|
BuildRequires: kf5coreaddons-devel
|
|
BuildRequires: kf5config-devel
|
|
BuildRequires: kf5i18n-devel
|
|
BuildRequires: kf5iconthemes-devel
|
|
BuildRequires: kf5kio-devel
|
|
BuildRequires: kf5parts-devel
|
|
BuildRequires: kf5service-devel
|
|
BuildRequires: kf5solid-devel
|
|
BuildRequires: kpmcore-devel
|
|
BuildRequires: yaml-cpp-devel
|
|
BuildRequires: pkgconfig(polkit-qt5-1)
|
|
BuildRequires: pkgconfig(python3)
|
|
BuildRequires: pkgconfig(blkid)
|
|
BuildRequires: pkgconfig(libatasmart)
|
|
BuildRequires: pkgconfig(libcrypto)
|
|
BuildRequires: pkgconfig(libparted)
|
|
BuildRequires: pkgconfig(Qt5Concurrent)
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
BuildRequires: pkgconfig(Qt5DBus)
|
|
BuildRequires: pkgconfig(Qt5Gui)
|
|
BuildRequires: pkgconfig(Qt5Network)
|
|
BuildRequires: pkgconfig(Qt5Quick)
|
|
BuildRequires: pkgconfig(Qt5QuickWidgets)
|
|
BuildRequires: pkgconfig(Qt5Svg)
|
|
BuildRequires: pkgconfig(Qt5Test)
|
|
BuildRequires: pkgconfig(Qt5Widgets)
|
|
BuildRequires: pkgconfig(Qt5WebEngineWidgets)
|
|
BuildRequires: pkgconfig(Qt5Xml)
|
|
Requires(post): branding-configs-fresh
|
|
Requires: console-setup
|
|
Requires: coreutils
|
|
Requires: dmidecode
|
|
Requires: dosfstools
|
|
Requires: dracut
|
|
Requires: e2fsprogs
|
|
Requires: gawk
|
|
Requires: gptfdisk
|
|
Requires: grub2
|
|
%ifarch x86_64
|
|
# EFI currently only supported on x86_64
|
|
Requires: grub2-efi
|
|
%endif
|
|
Requires: lvm2
|
|
Requires: NetworkManager
|
|
Requires: ntfs-3g
|
|
# (tpg) needed for calamares-install-setup
|
|
Requires: openbox
|
|
Requires: os-prober
|
|
Requires: partitionmanager
|
|
Requires: polkit
|
|
Requires: rsync
|
|
Requires: setxkbmap
|
|
Requires: shadow-utils
|
|
Requires: squashfs-tools
|
|
Requires: systemd
|
|
Requires: systemd-units
|
|
Requires: urpmi
|
|
Requires: util-linux
|
|
Requires: xkbcomp
|
|
Requires: xli
|
|
ExclusiveArch: %{ix86} x86_64
|
|
|
|
%description
|
|
Calamares is a distribution-independent installer framework, designed to
|
|
install from a live CD/DVD/USB environment to a hard disk. It includes
|
|
a graphical installation program based on Qt 5.
|
|
|
|
%files
|
|
%doc LICENSE AUTHORS
|
|
%dir %{_sysconfdir}/systemd/system/calamares.target.wants
|
|
%dir %{_libdir}/calamares
|
|
%dir %{_datadir}/calamares
|
|
%dir %{_datadir}/calamares/branding
|
|
%dir %{_datadir}/calamares/branding/default
|
|
%dir %{_sysconfdir}/calamares
|
|
%dir %{_sysconfdir}/calamares/modules
|
|
%dir %{_sysconfdir}/calamares/branding
|
|
%dir %{_sysconfdir}/calamares/branding/auto
|
|
%dir %{_datadir}/calamares/qml
|
|
%dir %{_datadir}/calamares/qml/calamares
|
|
%dir %{_datadir}/calamares/qml/calamares/slideshow
|
|
%{_presetdir}/90-%{name}.preset
|
|
%{_sysconfdir}/systemd/system/calamares.target.wants/%{name}.service
|
|
%{_unitdir}/%{name}.service
|
|
%{_unitdir}/%{name}.target
|
|
%{_sbindir}/%{name}-install-start
|
|
%{_sbindir}/%{name}-install-setup
|
|
%{_bindir}/calamares
|
|
%{_datadir}/calamares/settings.conf
|
|
%{_datadir}/calamares/branding/default/*
|
|
%{_datadir}/calamares/modules/
|
|
%{_datadir}/calamares/qml/calamares/slideshow/*.qml
|
|
%{_datadir}/calamares/qml/calamares/slideshow/qmldir
|
|
%{_datadir}/applications/calamares.desktop
|
|
%{_datadir}/polkit-1/actions/com.github.calamares.calamares.policy
|
|
%{_iconsdir}/hicolor/*/apps/%{name}.*
|
|
%{_sysconfdir}/calamares/*.conf
|
|
%{_sysconfdir}/calamares/modules/*.conf
|
|
%{_libdir}/calamares/*
|
|
%ghost %{_sysconfdir}/calamares/branding/auto/branding.desc
|
|
%{_sysconfdir}/calamares/branding/auto/*.qml
|
|
%{_sysconfdir}/calamares/branding/auto/*.png
|
|
|
|
%post
|
|
# generate the "auto" branding
|
|
. %{_sysconfdir}/os-release
|
|
|
|
cat >%{_sysconfdir}/calamares/branding/auto/branding.desc <<EOF
|
|
# THIS FILE IS AUTOMATICALLY GENERATED! ANY CHANGES TO THIS FILE WILL BE LOST!
|
|
---
|
|
componentName: auto
|
|
|
|
strings:
|
|
productName: "$NAME"
|
|
shortProductName: "$NAME"
|
|
version: "$VERSION"
|
|
shortVersion: "$VERSION"
|
|
versionedName: "$NAME $VERSION"
|
|
shortVersionedName: "$NAME $VERSION"
|
|
bootloaderEntryName: "ROSA Desktop Fresh"
|
|
productUrl: "$HOME_URL"
|
|
supportUrl: "$BUG_REPORT_URL"
|
|
knownIssuesUrl: "http://wiki.rosalab.ru/ru/index.php/Errata_ROSA_Desktop_R6"
|
|
releaseNotesUrl: "http://wiki.rosalab.ru/ru/index.php/ROSA_Desktop_Fresh_R6"
|
|
|
|
images:
|
|
productLogo: "%{_datadir}/calamares/branding/default/squid.png"
|
|
productIcon: "%{_datadir}/calamares/branding/default/squid.png"
|
|
|
|
slideshow: "rosa-ads.qml"
|
|
|
|
style:
|
|
sidebarBackground: "#263039"
|
|
sidebarText: "#FFFFFF"
|
|
sidebarTextSelect: "#292F34"
|
|
|
|
EOF
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: Shared library for Calamares
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
Shared library for Calamares.
|
|
|
|
%files -n %{libname}
|
|
%{_libdir}/libcalamares.so.%{major}
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libnameui}
|
|
Summary: Shared library for Calamares
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libnameui}
|
|
Shared library for Calamares.
|
|
|
|
%files -n %{libnameui}
|
|
%{_libdir}/libcalamaresui.so.%{major}
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development files for Calamares
|
|
Group: Development/C
|
|
Requires: %{libname} = %{EVRD}
|
|
Requires: %{libnameui} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Development files and headers for Calamares.
|
|
|
|
%files -n %{devname}
|
|
%dir %{_includedir}/libcalamares
|
|
%dir %{_libdir}/cmake/Calamares
|
|
%{_includedir}/libcalamares/*
|
|
%{_libdir}/libcalamares.so
|
|
%{_libdir}/libcalamaresui.so
|
|
%{_libdir}/cmake/Calamares/*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
|
|
#delete backup files
|
|
rm -f src/modules/*/*.conf.default-settings
|
|
|
|
%build
|
|
%cmake_qt5 \
|
|
-DWITH_PARTITIONMANAGER:BOOL=ON \
|
|
-DWITH_PYTHON:BOOL=ON
|
|
|
|
%make
|
|
|
|
%install
|
|
%makeinstall_std -C build
|
|
|
|
#own the local settings directories
|
|
mkdir -p %{buildroot}%{_sysconfdir}/calamares/modules
|
|
mkdir -p %{buildroot}%{_sysconfdir}/calamares/branding/auto
|
|
touch %{buildroot}%{_sysconfdir}/calamares/branding/auto/branding.desc
|
|
|
|
# (tpg) settings specific for OMV
|
|
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/calamares/modules/bootloader.conf
|
|
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/calamares/modules/displaymanager.conf
|
|
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/calamares/modules/finished.conf
|
|
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/calamares/modules/fstab.conf
|
|
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/calamares/modules/grubcfg.conf
|
|
install -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/calamares/modules/keyboard.conf
|
|
install -m 644 %{SOURCE13} %{buildroot}%{_sysconfdir}/calamares/modules/locale.conf
|
|
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/calamares/modules/machineid.conf
|
|
install -m 644 %{SOURCE15} %{buildroot}%{_sysconfdir}/calamares/modules/mount.conf
|
|
install -m 644 %{SOURCE16} %{buildroot}%{_sysconfdir}/calamares/modules/packages.conf
|
|
install -m 644 %{SOURCE17} %{buildroot}%{_sysconfdir}/calamares/modules/welcome.conf
|
|
install -m 644 %{SOURCE18} %{buildroot}%{_sysconfdir}/calamares/modules/services.conf
|
|
install -m 644 %{SOURCE19} %{buildroot}%{_sysconfdir}/calamares/settings.conf
|
|
install -m 644 %{SOURCE20} %{buildroot}%{_sysconfdir}/calamares/modules/unpackfs.conf
|
|
install -m 644 %{SOURCE21} %{buildroot}%{_sysconfdir}/calamares/modules/users.conf
|
|
install -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/calamares/modules/partition.conf
|
|
install -m 644 %{SOURCE23} %{buildroot}%{_sysconfdir}/calamares/modules/removeuser.conf
|
|
install -m 644 %{SOURCE24} %{buildroot}%{_sysconfdir}/calamares/modules/webview.conf
|
|
|
|
# (tpg) service files
|
|
mkdir -p %{buildroot}{%{_unitdir},%{_sbindir},%{_sysconfdir}/systemd/system/calamares.target.wants}
|
|
install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.target
|
|
install -m 755 %{SOURCE5} %{buildroot}%{_sbindir}/%{name}-install-start
|
|
install -m 744 %{SOURCE6} %{buildroot}%{_sbindir}/%{name}-install-setup
|
|
ln -sf %{_unitdir}/%{name}.service %{buildroot}%{_sysconfdir}/systemd/system/calamares.target.wants/%{name}.service
|
|
|
|
install -d %{buildroot}%{_presetdir}
|
|
cat > %{buildroot}%{_presetdir}/90-%{name}.preset << EOF
|
|
enable %{name}.service
|
|
EOF
|
|
|
|
# (tpg) install adverts and slideshow
|
|
tar xf %{SOURCE100} -C %{buildroot}%{_sysconfdir}/calamares/branding/auto
|
|
|