Blob Blame Raw
%global snapdate 20150105
%global snaphash fe44633e0ca5205b6eb4baf55c3a3867a6d17c73
%global partitionmanagerhash 3f1ace00592088a920f731acb1e42417f71f5e62

Name:           calamares
Version:        0.17.0
Release:        6.%{snapdate}git%(echo %{snaphash} | cut -c -13)%{?dist}
Summary:        Installer from a live CD/DVD/USB to disk

License:        GPLv3+

# adjust some default settings (default shipped .conf files)
Patch0:         calamares-default-settings.patch
# .desktop file customizations and fixes (e.g. don't use nonexistent Icon=)
Patch1:         calamares-desktop-file.patch

# Calamares is only supported where live images (and GRUB) are. (#1171380)
# This list matches the livearches global from anaconda.spec
ExclusiveArch:  %{ix86} x86_64 ppc ppc64 ppc64le

BuildRequires:  kf5-rpm-macros

BuildRequires:  cmake >= 2.8.12
BuildRequires:  extra-cmake-modules >= 0.0.13

BuildRequires:  qt5-qtbase-devel >= 5.3
BuildRequires:  qt5-qtsvg-devel >= 5.3
BuildRequires:  qt5-qttools-devel >= 5.3
BuildRequires:  polkit-qt5-1-devel

BuildRequires:  kf5-kconfig-devel
BuildRequires:  kf5-kcoreaddons-devel
BuildRequires:  kf5-ki18n-devel
BuildRequires:  kf5-solid-devel

BuildRequires:  pkgconfig
BuildRequires:  gettext

BuildRequires:  python3-devel >= 3.3
BuildRequires:  boost-python3-devel >= 1.55.0
%global __python %{__python3}

BuildRequires:  yaml-cpp-devel >= 0.5.1
BuildRequires:  libblkid-devel
BuildRequires:  libatasmart-devel
BuildRequires:  parted-devel

BuildRequires:  desktop-file-utils

# for automatic branding setup
Requires(post): system-release
Requires(post): system-logos
Requires:       system-logos

Requires:       coreutils
Requires:       util-linux
Requires:       dracut
Requires:       grub2
%ifarch x86_64
# EFI currently only supported on x86_64
Requires:       grub2-efi
Requires:       console-setup
Requires:       xorg-x11-xkb-utils
Requires:       NetworkManager
Requires:       os-prober
Requires:       e2fsprogs
Requires:       dosfstools
Requires:       ntfsprogs
Requires:       gawk
Requires:       systemd
Requires:       rsync
Requires:       shadow-utils
Requires:       polkit
%if 0%{?fedora} > 21
Requires:       dnf
%global use_yum 1
Requires:       yum

Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

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. This package includes the Calamares
framework and the required configuration files to produce a working replacement
for Anaconda's liveinst.

%package        libs
Summary:        Calamares runtime libraries
Requires:       %{name} = %{version}-%{release}

%description    libs

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
Requires:       cmake

%description    devel
The %{name}-devel package contains libraries and header files for
developing custom modules for Calamares.

%setup -q -n %{name}-%{snaphash} -a 1
rmdir src/modules/partition/partitionmanager
mv -f partitionmanager-%{partitionmanagerhash} src/modules/partition/partitionmanager
%patch0 -p1 -b .default-settings
%patch1 -p1 -b .desktop-file
# delete backup files so they don't get installed
rm -f src/modules/*/*.conf.default-settings
%if 0%{?use_yum}
sed -i -e 's/^backend: dnf$/backend: yum/g' src/modules/packages/packages.conf

mkdir -p %{_target_platform}
pushd %{_target_platform}

make %{?_smp_mflags} -C %{_target_platform}

make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
# own the auto branding directory
mkdir -p %{buildroot}%{_datadir}/calamares/branding/auto
touch %{buildroot}%{_datadir}/calamares/branding/auto/branding.desc
# own the local settings directories
mkdir -p %{buildroot}%{_sysconfdir}/calamares/modules
mkdir -p %{buildroot}%{_sysconfdir}/calamares/branding

# validate the .desktop file
desktop-file-validate %{buildroot}%{_datadir}/applications/calamares.desktop

# generate the "auto" branding
. %{_sysconfdir}/os-release


if [ -e %{_datadir}/pixmaps/fedora-logo-sprite.png ] ; then

cat >%{_datadir}/calamares/branding/auto/branding.desc <<EOF
componentName:  auto

    productName:         "$NAME"
    shortProductName:    "$NAME"
    version:             "$VERSION"
    shortVersion:        "$VERSION_ID"
    versionedName:       "$NAME $VERSION"
    shortVersionedName:  "$NAME $VERSION_ID"
    bootloaderEntryName: "$NAME"

    productLogo:         "$LOGO"
    productIcon:         "$SPRITE"

    - "$LOGO"

%dir %{_datadir}/calamares/
%dir %{_datadir}/calamares/branding/
%dir %{_datadir}/calamares/branding/auto/
%ghost %{_datadir}/calamares/branding/auto/branding.desc

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig

%files libs
# unversioned library

%files devel

* Sat Jan 10 2015 Kevin Kofler <> - 0.17.0-6.20150105gitfe44633e0ca52
- New snapshot, improves the partitioning interface and updates translations
- Point URL to
- default-settings patch: Enable the packages module, make it remove calamares
- desktop-file patch: Remove the NoDisplay=true line, unneeded with the above
- Requires: dnf or yum depending on the Fedora version, for the packages module
- Explicitly define CMAKE_INSTALL_CMAKEDIR to work around FTBFS for now

* Sun Dec 07 2014 Kevin Kofler <> - 0.17.0-5.20141206giteb748cca8ebfc
- Bump Release to distinguish official F21 update from Copr build

* Sun Dec 07 2014 Kevin Kofler <> - 0.17.0-4.20141206giteb748cca8ebfc
- New snapshot, fixes detection and setup of display managers
- default-settings patch: Don't delist non-sddm DMs from displaymanager.conf
- Drop the Requires: sddm, no longer needed (now works with any DM or even none)

* Sat Dec 06 2014 Kevin Kofler <> - 0.17.0-3.20141206git75adfa03fcba0
- New snapshot, fixes some bugs, adds partial/incomplete grub-efi support
- Add ExclusiveArch matching the livearches from anaconda.spec (#1171380)
- Requires: grub-efi on x86_64
- Rebase default-settings patch, set efiBootloaderId in grub.cfg

* Sat Nov 29 2014 Kevin Kofler <> - 0.17.0-2.20141128giteee54241d1f58
- New snapshot, sets the machine-id, fixes mounting/unmounting bugs
- Rebase default-settings patch

* Thu Nov 27 2014 Kevin Kofler <> - 0.17.0-1.20141127git8591dcf731cbf
- New snapshot, adds locale selector, fixes installation with SELinux enabled
- Use the version number from CMakeLists.txt, now at 0.17.0
- Use post-release snapshot numbering, milestone 0.17 was already reached

* Mon Nov 24 2014 Kevin Kofler <> - 0-0.17.20141123gitc17898a6501fd
- New snapshot, adds "About" dialog and improves partitioning error reporting

* Thu Nov 20 2014 Kevin Kofler <> - 0-0.16.20141119git01c3244396f35
- Automatically generate the branding to use by default (new "auto" branding)
- Remove README.branding, no longer needed

* Thu Nov 20 2014 Kevin Kofler <> - 0-0.15.20141119git01c3244396f35
- New snapshot, creates /etc/default/grub if missing (calamares#128)
- README.branding: Mention new bootloaderEntryName setting
- Remove no longer needed workaround that wrote /etc/default/grub in %%post

* Tue Nov 18 2014 Kevin Kofler <> - 0-0.14.20141117gitdf47842fc7a03
- New snapshot, makes Python modules get branding information from branding.desc
- README.branding: Update with the resulting simplified instructions

* Sat Nov 15 2014 Kevin Kofler <> - 0-0.13.20141115git6b2ccfb442def
- New snapshot, adds retranslation support to more modules, fixes writing
  /etc/hosts, writes /etc/locale.conf (always LANG=en_US.UTF-8 for now)
- Drop grub2-tools (calamares#123) patch, names made configurable upstream
- Update default-settings patch to set the grub2 names and handle new modules
- Drop workaround recreating calamares/ symlink, fixed upstream
- Move desktop-file-validate call to %%check

* Tue Nov 11 2014 Kevin Kofler <> - 0-0.12.20141111gitfaa77d7f5e656
- New snapshot, writes keyboard configuration files to the installed system
  (calamares#31), adds a language selector and dynamic retranslation support

* Fri Nov 07 2014 Kevin Kofler <> - 0-0.11.20141107gitfd5d1935290d9
- New snapshot, fixes the calamares#132 fix again, fixes enabling translations

* Thu Nov 06 2014 Kevin Kofler <> - 0-0.10.20141106git1df44eddba572
- New snapshot, fixes the calamares#132 fix, calamares#124 (colors in build.log)
- Drop pkexec policy rename from desktop-file patch, fixed upstream

* Wed Nov 05 2014 Kevin Kofler <> - 0-0.9.20141104gitb9af5b7d544a7
- New snapshot, creates sddm.conf if missing (calamares#132), adds translations
- Use and customize the new upstream .desktop file
- Point URL to the new page

* Tue Oct 28 2014 Kevin Kofler <> - 0-0.8.20141028git10ca85338db00
- New snapshot, fixes FTBFS in Rawhide (Qt 5.4.0 beta) (calamares#125)

* Tue Oct 28 2014 Kevin Kofler <> - 0-0.7.20141027git6a9c9cbaae0a9
- Add a README.branding documenting how to rebrand Calamares

* Mon Oct 27 2014 Kevin Kofler <> - 0-0.6.20141027git6a9c9cbaae0a9
- New snapshot, device-source patch (calamares#127) upstreamed

* Thu Oct 23 2014 Kevin Kofler <> - 0-0.5.20141020git89fe455163c62
- Disable startup notification, does not work properly with pkexec

* Wed Oct 22 2014 Kevin Kofler <> - 0-0.4.20141020git89fe455163c62
- Add a .desktop file that live kickstarts can use to show a menu entry or icon

* Mon Oct 20 2014 Kevin Kofler <> - 0-0.3.20141020git89fe455163c62
- New snapshot, fixes escape sequences in g++ diagnostics in the build.log
- Allow using devices as sources for unpackfs, fixes failure to install
- Write /etc/default/grub in %%post if missing, fixes another install failure
- Fix the path to grub.cfg, fixes another install failure
- Own /etc/calamares/branding/

* Mon Oct 20 2014 Kevin Kofler <> - 0-0.2.20141017git8a623cc1181e9
- Remove unnecessary Requires: kf5-filesystem

* Mon Oct 20 2014 Kevin Kofler <> - 0-0.1.20141017git8a623cc1181e9
- Initial package