%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %define name grub2-btrfs %define version 1.11 %define release 5%{dist} Summary: grub2 snapshot plugin Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Applications/System BuildArch: noarch URL: https://github.com/Antynea/grub-btrfs Packager: andreas@benzlerweb.de Requires: btrfs-progs Requires: snapper Source: grub-btrfs-%{version}.tar.gz Patch10: grub2-btrfs-arch-centos.patch Patch11: grub2-btrfs-dertemite-boottype.patch %description Grub2 plugin for snapper. It create menuentries from snapshots. %prep %setup -n grub-btrfs-%{version} %patch10 -p0 %patch11 -p0 %install install -d %{buildroot}/etc/grub.d/} install -m 755 41_snapshots-btrfs %{buildroot}/etc/grub.d/41_snapshots-btrfs install -d %{buildroot}/usr/share/locale/fr/LC_MESSAGES/ install -m 644 localisation/fr/grub-btrfs-git.mo %{buildroot}/usr/share/locale/fr/LC_MESSAGES/grub-btrfs-git.mo # removed for now #pre #/bin/rpm -q grub2 || /bin/rpm -q grub2-efi || /bin/echo "grub2 or grub2-efi" && /bin/false %files %defattr(-,root,root) /etc/grub.d/41_snapshots-btrfs /usr/share/locale/fr/LC_MESSAGES/grub-btrfs-git.mo %changelog * Sun Jul 02 2017 andreas@benzlerweb.de 1.11 - 5 - harmonized_snapshots_entry now dertemite efi / bios patch, this should be used for redhat based distros * Wed Jun 14 2017 andreas@benzlerweb.de 1.11 - 4 - removed pre for now, fix installation * Wed Jun 14 2017 andreas@benzlerweb.de 1.11 - 3 - remove Requires: grub2 and add pre to test for grub2 or grub2-efi * Wed Jun 14 2017 andreas@benzlerweb.de 1.11 - 2 - correct package name to grub2 - add dertemite efi / bios patch * Wed Jun 14 2017 andreas@benzlerweb.de 1.11 - 1 - create patch to show up as CentOS - create package