generate manpage and patch build for simple-cmd-0.2
This commit is contained in:
parent
c187e7c158
commit
1c7c44667e
|
@ -0,0 +1,20 @@
|
||||||
|
--- cabal-rpm-0.13.3/src/PackageUtils.hs~ 2019-05-11 15:22:29.000000000 +0800
|
||||||
|
+++ cabal-rpm-0.13.3/src/PackageUtils.hs 2019-09-04 18:30:50.875375095 +0800
|
||||||
|
@@ -42,7 +42,7 @@
|
||||||
|
import FileUtils (filesWithExtension, fileWithExtension,
|
||||||
|
getDirectoryContents_, mktempdir, withTempDirectory)
|
||||||
|
import Options (RpmFlags (..))
|
||||||
|
-import SimpleCmd (cmd, cmd_, cmdIgnoreErr, cmdLines, grep_, sudo,
|
||||||
|
+import SimpleCmd (cmd, cmd_, cmdIgnoreErr, cmdLines, grep_, sudo_,
|
||||||
|
(+-+))
|
||||||
|
import SimpleCmd.Git (isGitDir, grepGitConfig)
|
||||||
|
import SysCmd (die, optionalProgram, requireProgram, rpmEval)
|
||||||
|
@@ -576,7 +576,7 @@
|
||||||
|
pkginstaller <- packageManager
|
||||||
|
let (inst, arg) = if pkginstaller == "dnf" then ("dnf", "install") else ("yum", "localinstall")
|
||||||
|
tty <- hIsTerminalDevice stdout
|
||||||
|
- sudo inst $ ["-y" | not tty] ++ [arg] ++ rpms
|
||||||
|
+ sudo_ inst $ ["-y" | not tty] ++ [arg] ++ rpms
|
||||||
|
|
||||||
|
editSpecField :: String -> String -> FilePath -> IO ()
|
||||||
|
editSpecField field new spec =
|
|
@ -7,6 +7,8 @@
|
||||||
%bcond_with https
|
%bcond_with https
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%bcond_without manpage
|
||||||
|
|
||||||
Name: cabal-rpm
|
Name: cabal-rpm
|
||||||
Version: 0.13.3
|
Version: 0.13.3
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
|
@ -18,6 +20,7 @@ Url: https://hackage.haskell.org/package/%{name}
|
||||||
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
|
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||||
# End cabal-rpm sources
|
# End cabal-rpm sources
|
||||||
Source1: cblrpm.1
|
Source1: cblrpm.1
|
||||||
|
Patch1: cabal-rpm-0.13.3-simple-cmd_sudo.patch
|
||||||
|
|
||||||
# Begin cabal-rpm deps:
|
# Begin cabal-rpm deps:
|
||||||
BuildRequires: ghc-rpm-macros
|
BuildRequires: ghc-rpm-macros
|
||||||
|
@ -40,6 +43,9 @@ BuildRequires: ghc-simple-cmd-static
|
||||||
BuildRequires: ghc-time-static
|
BuildRequires: ghc-time-static
|
||||||
BuildRequires: ghc-unix-static
|
BuildRequires: ghc-unix-static
|
||||||
# End cabal-rpm deps
|
# End cabal-rpm deps
|
||||||
|
%if %{with manpage}
|
||||||
|
BuildRequires: pandoc
|
||||||
|
%endif
|
||||||
Obsoletes: cabal2spec < 0.26
|
Obsoletes: cabal2spec < 0.26
|
||||||
Provides: cblrpm = %{version}-%{release}
|
Provides: cblrpm = %{version}-%{release}
|
||||||
Requires: cabal-install
|
Requires: cabal-install
|
||||||
|
@ -72,12 +78,18 @@ Standalone packages can also be packaged built with cabal-install.
|
||||||
# Begin cabal-rpm setup:
|
# Begin cabal-rpm setup:
|
||||||
%setup -q
|
%setup -q
|
||||||
# End cabal-rpm setup
|
# End cabal-rpm setup
|
||||||
|
%if 0%{?fedora} >= 31
|
||||||
|
%patch1 -p1 -b .orig
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Begin cabal-rpm build:
|
# Begin cabal-rpm build:
|
||||||
%ghc_bin_build
|
%ghc_bin_build
|
||||||
# End cabal-rpm build
|
# End cabal-rpm build
|
||||||
|
%if %{with manpage}
|
||||||
|
pandoc -s -t man man/cabal-rpm.1.md > man/cabal-rpm.1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
@ -85,11 +97,14 @@ Standalone packages can also be packaged built with cabal-install.
|
||||||
%ghc_bin_install
|
%ghc_bin_install
|
||||||
# End cabal-rpm install
|
# End cabal-rpm install
|
||||||
|
|
||||||
|
%if %{with manpage}
|
||||||
install -p -m 0644 -D man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
install -p -m 0644 -D man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
||||||
install -p -m 0644 %SOURCE1 %{buildroot}%{_mandir}/man1/
|
install -p -m 0644 %SOURCE1 %{buildroot}%{_mandir}/man1/
|
||||||
|
%endif
|
||||||
|
|
||||||
ln -s %{name} %{buildroot}%{_bindir}/cblrpm
|
ln -s %{name} %{buildroot}%{_bindir}/cblrpm
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
# Begin cabal-rpm files:
|
# Begin cabal-rpm files:
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
@ -103,7 +118,8 @@ ln -s %{name} %{buildroot}%{_bindir}/cblrpm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Aug 01 2019 Jens Petersen <petersen@redhat.com> - 0.13.3-3
|
* Thu Aug 01 2019 Jens Petersen <petersen@redhat.com> - 0.13.3-3
|
||||||
- rebuild
|
- generate manpage (#1725973)
|
||||||
|
- fix build with simple-cmd 0.2
|
||||||
|
|
||||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.3-2
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.3-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
Loading…
Reference in New Issue