From 3a935c4d907e605e12ac6794b67a13c39390f6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= ppisar@redhat.com Date: Fri, 28 Apr 2017 15:04:51 +0200 Subject: Introduce build-condition for disabling support for xdg-user-dirs
--- perl-File-BaseDir.spec | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/perl-File-BaseDir.spec b/perl-File-BaseDir.spec index 46447bf..24729b1 100644 --- a/perl-File-BaseDir.spec +++ b/perl-File-BaseDir.spec @@ -1,3 +1,5 @@ +# Utilize xdg-user-dirs +%{bcond_without perl_File_BaseDir_enables_xdg_user_dirs} Name: perl-File-BaseDir Version: 0.07 Release: 6%{?dist} @@ -19,7 +21,9 @@ BuildRequires: perl(parent) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Optional run-time: +%if %{with perl_File_BaseDir_enables_xdg_user_dirs} BuildRequires: xdg-user-dirs +%endif # Tests BuildRequires: perl(Config) BuildRequires: perl(File::Spec::Functions) @@ -36,6 +40,7 @@ cache data. It is suggested that desktop applications for e.g. the Gnome, KDE or Xfce platforms follow this layout. However, the same layout can just as well be used for non-GUI applications.
+%if %{with perl_File_BaseDir_enables_xdg_user_dirs} %package -n perl-File-UserDirs Summary: Find extra media and documents Freedesktop.org directories Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) @@ -47,6 +52,7 @@ Conflicts: %{name} < 0.06-2 File::UserDirs Perl module can be used to find directories as informally specified by the Freedesktop.org xdg-user-dirs software. This gives a mechanism to locate extra directories for media and documents files. +%endif
%prep @@ -71,11 +77,13 @@ make test %{_mandir}/man3/* %exclude %{_mandir}/man3/File::UserDirs.3pm.gz
+%if %{with perl_File_BaseDir_enables_xdg_user_dirs} %files -n perl-File-UserDirs %doc Changes README %dir %{perl_vendorlib}/File %{perl_vendorlib}/File/UserDirs.pm %{_mandir}/man3/File::UserDirs.3pm.gz +%endif
%changelog * Sat Feb 11 2017 Fedora Release Engineering releng@fedoraproject.org - 0.07-6
perl-devel@lists.fedoraproject.org