git.iko.soy/typeable/pandoc
on master help sign in
Removed custom Setup.hs, use build-type: simple.

The only thing we gained from the custom build was automatic installation of the man page when using 'cabal install'. But custom builds cause problems, e.g., with cross-compilation. Installation of the man page is better handled by packagers. Note to packagers (e.g. Debian): it may be necessary to add a step installing the man page with the next release.

commite8fba105a5e0d63b5fdbc7505d657eda13a52b59 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 2 Jan 2019, 17:02 (8 years ago) parent308e467
2 files changed+2−41
Setup.hs+1−37 pandoc.cabal+1−4
Setup.hs+1−37
@@ -1,38 +1,2 @@
1−{-
2−Copyright (C) 2006-2018 John MacFarlane <jgm@berkeley.edu>
3−
4−This program is free software; you can redistribute it and/or modify
5−it under the terms of the GNU General Public License as published by
6−the Free Software Foundation; either version 2 of the License, or
7−(at your option) any later version.
8−
9−This program is distributed in the hope that it will be useful,
10−but WITHOUT ANY WARRANTY; without even the implied warranty of
11−MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12−GNU General Public License for more details.
13−
14−You should have received a copy of the GNU General Public License
15−along with this program; if not, write to the Free Software
16−Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17−-}
18−
191import Distribution.Simple
20−import Distribution.Simple.Setup (CopyFlags(..), fromFlag)
21−import Distribution.PackageDescription (PackageDescription(..))
22−import Distribution.Simple.Utils (notice, installOrdinaryFiles)
23−import Distribution.Simple.LocalBuildInfo
24−
25−main :: IO ()
26−main = defaultMainWithHooks $ simpleUserHooks {
27− postCopy = installManPage
28− }
29−
30−installManPage :: Args -> CopyFlags
31− -> PackageDescription -> LocalBuildInfo -> IO ()
32−installManPage _ flags pkg lbi = do
33− let verbosity = fromFlag (copyVerbosity flags)
34− let copydest = fromFlag (copyDest flags)
35− let mandest = mandir (absoluteInstallDirs pkg lbi copydest)
36− ++ "/man1"
37− notice verbosity $ "Copying man page to " ++ mandest
38− installOrdinaryFiles verbosity mandest [("man", "pandoc.1")]
2+main = defaultMain
pandoc.cabal+1−4
@@ -1,7 +1,7 @@
11name: pandoc
22version: 2.6
33cabal-version: 2.0
4−build-type: Custom
4+build-type: Simple
55license: GPL-2
66license-file: COPYING.md
77copyright: (c) 2006-2018 John MacFarlane
@@ -346,9 +346,6 @@ flag trypandoc
346346 Description: Build trypandoc cgi executable.
347347 Default: False
348348
349−custom-setup
350− setup-depends: base, Cabal >= 2.0
351−
352349library
353350 build-depends: base >= 4.8 && < 5,
354351 syb >= 0.1 && < 0.8,