%bcond_with systemd

%define glib2_version             2.48.0
%define gtk3_version              3.20.0
%define gnome_doc_utils_version   0.3.2
%define udisks2_version           2.0.0

Summary: Disk management application
Summary(ja): ディスク管理アプリケーション
Name: gnome-disk-utility
Version: 40.1
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
Group: desktop-gnome,admin-tools
Vendor: Project Vine
Distribution: Vine Linux

License: LGPLv2+
URL: https://gitlab.gnome.org/GNOME/gnome-disk-utility
%global shortver %(echo %{version} | cut -d . -f 1)
Source0: https://download.gnome.org/sources/gnome-disk-utility/%{shortver}/%{name}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  meson
BuildRequires:  pkgconfig(dvdread)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  libcanberra-gtk3-devel
BuildRequires:  pkgconfig(libhandy-1)
BuildRequires:  pkgconfig(liblzma)
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libsecret-1)
BuildRequires:  pkgconfig(pwquality)
BuildRequires:  pkgconfig(udisks2)
BuildRequires:  gettext
BuildRequires:  /usr/bin/xsltproc
BuildRequires:  docbook-style-xsl
%if %{with systemd}
BuildRequires:  pkgconfig(libsystemd)
%else
BuildRequires:  elogind-devel
%endif

Requires:       udisks2

Obsoletes: gnome-disk-utility-format
Obsoletes: nautilus-gdu

Obsoletes: %{name}-libs < 3.4.0
Provides: %{name}-libs = %{version}
Obsoletes: %{name}-ui-libs < 3.4.0
Provides: %{name}-ui-libs = %{version}

Obsoletes: %{name}-devel < 3.4.0
Obsoletes: %{name}-ui-devel < 3.4.0

%description
This package contains the Palimpsest disk management application.
Palimpsest supports partitioning, file system creation, encryption,
RAID, SMART monitoring, etc.


%debug_package


%prep
%setup -q


%build
%meson \
%if %{with systemd}
	-Dlogind=libsystemd
%else
	-Dlogind=libelogind
%endif

%meson_build


%install
rm -rf $RPM_BUILD_ROOT
%meson_install
%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS NEWS README.md
%{_bindir}/gnome-disks
%{_bindir}/gnome-disk-image-mounter
%{_datadir}/applications/org.gnome.DiskUtility.desktop
%{_datadir}/applications/gnome-disk-image-mounter.desktop
%{_datadir}/applications/gnome-disk-image-writer.desktop
%{_datadir}/dbus-1/services/org.gnome.DiskUtility.service
%{_datadir}/glib-2.0/schemas/org.gnome.Disks.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/metainfo/org.gnome.DiskUtility.appdata.xml
%{_mandir}/man1/*
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop
%{_libexecdir}/gsd-disk-utility-notify


%changelog
* Thu May 13 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 40.1-1
- new upstream release.
- dropped scriptlets.

* Sun Jul 17 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.20.2-1
- new upstream release

* Sat Dec 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.3.1-1
- new upstream release

* Fri Nov 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.2-1
- new upstream release

* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.1-1
- new upstream release

* Sat May 30 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

* Sat May 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.0-1
- new upstream release

* Sat May 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.0-2
- rebuild with VineSeed environment

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.0-1
- new upstream release
- add BuildRequires: xz-devel

* Sun Jun 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.0-1
- new upstream release
- add BuildRequires: gnome-settings-daemon-devel, libcanberra-gtk3-devel, libdvdread-devel, libnotify-devel

* Fri Oct 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- add BuildRequires: libsecret-devel, libpwquality-devel, docbook-style-xsl
- add BuildRequires: autoconf, gnome-common
- change BuildRequires: yelp-tools instead of gnome-doc-utils

* Mon Apr 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.0-1
- new upstream release
- change BuildRequires: udisks2-devel instead of udisks-devel
- remove -libs, -ui-libs, -devel, -ui-devel sub packages

* Tue Aug 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.2-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: unique3-devel instead of unique-devel

* Tue Oct 05 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release
- fix %files

* Thu Apr 08 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-1
- new upstream release
- change BuildRequires: DeviceKit-disks-devel -> udisks-devel
- change Requires: DeviceKit-disks -> udisks
- add BuildRequires: avahi-ui-devel

* Wed Nov 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.28.1-1
- initial build for Vine Linux

* Mon Nov  2 2009 David Zeuthen <davidz@redhat.com> - 2.28.1-1%{?dist}
- Update to 2.28.1

* Tue Oct 13 2009 Tomas Bzatek <tbzatek@redhat.com> - 2.28.0-5%{?dist}
- Fix nautilus crashes by proper object referencing

* Mon Oct  5 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-4%{?dist}
- Incorporate fixes for translation issues from the stable upstream branch

* Fri Sep 18 2009 David Zeuthen <davidz@redhat.com> - 2.28.0-2%{?dist}
- BR libatasmart-devel

* Fri Sep 18 2009 David Zeuthen <davidz@redhat.com> - 2.28.0-1%{?dist}
- Update to upstream release 2.28.0
- Compared to previous releases, this release should whine less about SMART

* Mon Aug 17 2009 David Zeuthen <davidz@redhat.com> - 0.5-3%{?dist}
- Drop upstreamed patch

* Mon Aug 17 2009 David Zeuthen <davidz@redhat.com> - 0.5-2%{?dist}
- Rebuild

* Mon Aug 17 2009 David Zeuthen <davidz@redhat.com> - 0.5-1%{?dist}
- Update to release 0.5

* Mon Jul 27 2009 Matthias Clasen <mclasen@redhat.com> - 0.4-3%{?dist}
- Drop PolicyKit from .pc files, too

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jun 19 2009 David Zeuthen <davidz@redhat.com> - 0.4-1%{?dist}
- Update to release 0.4

* Fri May 01 2009 David Zeuthen <davidz@redhat.com> - 0.3-1%{?dist}
- Upstream release 0.3

* Wed Apr 15 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.5.20090415git%{?dist}
- New snapshot

* Sun Apr 12 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.4.20090412git%{?dist}
- New snapshot

* Fri Apr 10 2009 Matthias Clasen <mclasen@redhat.com> - 0.3-0.3.20090406git%{?dist}
- Don't own directories that belong to hicolor-icon-theme

* Wed Apr 08 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.2.20090406git%{?dist}
- Fix bug in detecting when a PolicyKit error is returned (#494787)

* Mon Apr 06 2009 David Zeuthen <davidz@redhat.com> - 0.3-0.1.20090406git%{?dist}
- New snapshot

* Wed Mar 04 2009 David Zeuthen <davidz@redhat.com> - 0.2-2%{?dist}
- Don't crash when changing the LUKS passphrase on a device

* Mon Mar 02 2009 David Zeuthen <davidz@redhat.com> - 0.2-1%{?dist}
- Update to version 0.2

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.git20080720.2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jan 27 2009 Matthias Clasen <mclasen@redhat.com> 0.1-0.git20080720.2%{?dist}
- Rebuild for pkgconfig provides

* Sun Nov 23 2008 Matthias Clasen <mclasen@redhat.com> 0.1-0.git20080720.1%{?dist}
- Improve %%summary and %%description

* Sun Jul 20 2008 David Zeuthen <davidz@redhat.com> - 0.1-0.git20080720%{?dist}
- Initial Packaging
