Added pandoc.1 to repository. Don't build as part of cabal build.
The process was too fragile. It made too many assumptions about available libraries (which failed sometimes when sandboxes were used). This is a low-tech solution. The only drawback is that `man/pandoc.1` is a generated file in the repository. It will need to be regenerated periodically when README changes.
This commit is contained in:
parent
fbc5384ef8
commit
79764df2d5
6 changed files with 4352 additions and 28 deletions
10
INSTALL
10
INSTALL
|
@ -75,12 +75,12 @@ Quick install
|
||||||
--extra-include-dirs=/usr/local/Cellar/icu4c/51.1/include \
|
--extra-include-dirs=/usr/local/Cellar/icu4c/51.1/include \
|
||||||
-funicode_collation text-icu pandoc-citeproc
|
-funicode_collation text-icu pandoc-citeproc
|
||||||
|
|
||||||
The `pandoc.1` man page will be built and installed automatically.
|
The `pandoc.1` man page will be installed automatically. cabal shows
|
||||||
The build process shows you where it is installed: you may need
|
you where it is installed: you may need to set your `MANPATH`
|
||||||
to set your `MANPATH` accordingly.
|
accordingly. If `README` has been modified, the man page can be
|
||||||
|
rebuilt: `make man/pandoc.1`.
|
||||||
|
|
||||||
The `pandoc-citeproc.1` man page will also be built and installed
|
The `pandoc-citeproc.1` man page will also be installed automatically.
|
||||||
automatically.
|
|
||||||
|
|
||||||
[GHC]: http://www.haskell.org/ghc/
|
[GHC]: http://www.haskell.org/ghc/
|
||||||
[Haskell platform]: http://hackage.haskell.org/platform/
|
[Haskell platform]: http://hackage.haskell.org/platform/
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -27,19 +27,26 @@ install: full
|
||||||
cabal copy
|
cabal copy
|
||||||
cabal register
|
cabal register
|
||||||
|
|
||||||
dist:
|
dist: man/pandoc.1
|
||||||
cabal sdist
|
cabal sdist
|
||||||
rm -rf "pandoc-${version}"
|
rm -rf "pandoc-${version}"
|
||||||
tar xvzf dist/pandoc-${version}.tar.gz
|
tar xvzf dist/pandoc-${version}.tar.gz
|
||||||
cd pandoc-${version}
|
cd pandoc-${version}
|
||||||
cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}"
|
cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}"
|
||||||
|
|
||||||
debpkg:
|
debpkg: man/pandoc.1
|
||||||
./make_deb.sh
|
./make_deb.sh
|
||||||
|
|
||||||
osxpkg:
|
osxpkg: man/pandoc.1
|
||||||
./make_osx_package.sh
|
./make_osx_package.sh
|
||||||
|
|
||||||
|
man/pandoc.1: README man/pandoc.1.template
|
||||||
|
pandoc $< -t man -s --template man/pandoc.1.template \
|
||||||
|
--filter man/capitalizeHeaders.hs \
|
||||||
|
--filter man/removeNotes.hs \
|
||||||
|
--filter man/removeLinks.hs \
|
||||||
|
-o $@
|
||||||
|
|
||||||
download_stats:
|
download_stats:
|
||||||
curl https://api.github.com/repos/jgm/pandoc/releases | \
|
curl https://api.github.com/repos/jgm/pandoc/releases | \
|
||||||
jq '[.[] | .assets | .[] | {name: .name, download_count: .download_count}]'
|
jq '[.[] | .assets | .[] | {name: .name, download_count: .download_count}]'
|
||||||
|
|
|
@ -2,6 +2,8 @@ _ Test, on linux, windows, mac (inc. website demos)
|
||||||
|
|
||||||
_ Finalize changelog
|
_ Finalize changelog
|
||||||
|
|
||||||
|
_ man man/pandoc.1 and commit if needed
|
||||||
|
|
||||||
_ Tag release in git
|
_ Tag release in git
|
||||||
|
|
||||||
_ Tag templates
|
_ Tag templates
|
||||||
|
|
21
Setup.hs
21
Setup.hs
|
@ -18,21 +18,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
import Distribution.Simple
|
import Distribution.Simple
|
||||||
import Distribution.Simple.PreProcess
|
import Distribution.Simple.PreProcess
|
||||||
import Distribution.Simple.InstallDirs (mandir)
|
import Distribution.PackageDescription (PackageDescription(..))
|
||||||
import Distribution.PackageDescription (PackageDescription(..), Executable(..))
|
|
||||||
import System.Process ( rawSystem )
|
import System.Process ( rawSystem )
|
||||||
import System.FilePath ( (</>) )
|
import System.FilePath ( (</>) )
|
||||||
import System.Directory ( findExecutable )
|
import System.Directory ( findExecutable )
|
||||||
import Distribution.Simple.Utils (info, notice, rawSystemExit, installOrdinaryFiles)
|
import Distribution.Simple.Utils (info, notice, installOrdinaryFiles)
|
||||||
import Distribution.Simple.Setup
|
import Distribution.Simple.Setup
|
||||||
import Distribution.Simple.LocalBuildInfo
|
import Distribution.Simple.LocalBuildInfo
|
||||||
import Distribution.Verbosity
|
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = defaultMainWithHooks $ simpleUserHooks {
|
main = defaultMainWithHooks $ simpleUserHooks {
|
||||||
-- enable hsb2hs preprocessor for .hsb files
|
-- enable hsb2hs preprocessor for .hsb files
|
||||||
hookedPreProcessors = [ppBlobSuffixHandler]
|
hookedPreProcessors = [ppBlobSuffixHandler]
|
||||||
, postBuild = makeManPage
|
|
||||||
, postCopy = installManPage
|
, postCopy = installManPage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,20 +46,6 @@ ppBlobSuffixHandler = ("hsb", \_ _ ->
|
||||||
return ()
|
return ()
|
||||||
})
|
})
|
||||||
|
|
||||||
makeManPage :: Args -> BuildFlags
|
|
||||||
-> PackageDescription -> LocalBuildInfo -> IO ()
|
|
||||||
makeManPage _ bf _ LocalBuildInfo{buildDir=buildDir}
|
|
||||||
= do notice verbosity "Creating man/pandoc.1"
|
|
||||||
rawSystemExit verbosity progPath args
|
|
||||||
where verbosity = fromFlagOrDefault normal $ buildVerbosity bf
|
|
||||||
progPath = buildDir </> "pandoc" </> "pandoc"
|
|
||||||
args = ["README", "-t", "man", "-s",
|
|
||||||
"--template", "man/pandoc.1.template",
|
|
||||||
"--filter", "man/capitalizeHeaders.hs",
|
|
||||||
"--filter", "man/removeNotes.hs",
|
|
||||||
"--filter", "man/removeLinks.hs",
|
|
||||||
"-o", "man/pandoc.1"]
|
|
||||||
|
|
||||||
installManPage :: Args -> CopyFlags
|
installManPage :: Args -> CopyFlags
|
||||||
-> PackageDescription -> LocalBuildInfo -> IO ()
|
-> PackageDescription -> LocalBuildInfo -> IO ()
|
||||||
installManPage _ flags pkg lbi = do
|
installManPage _ flags pkg lbi = do
|
||||||
|
|
4332
man/pandoc.1
Normal file
4332
man/pandoc.1
Normal file
File diff suppressed because it is too large
Load diff
|
@ -109,6 +109,7 @@ Data-Files:
|
||||||
Extra-Source-Files:
|
Extra-Source-Files:
|
||||||
-- documentation
|
-- documentation
|
||||||
INSTALL, BUGS, CONTRIBUTING.md, changelog
|
INSTALL, BUGS, CONTRIBUTING.md, changelog
|
||||||
|
man/pandoc.1
|
||||||
-- files needed to build man page
|
-- files needed to build man page
|
||||||
man/capitalizeHeaders.hs
|
man/capitalizeHeaders.hs
|
||||||
man/removeNotes.hs
|
man/removeNotes.hs
|
||||||
|
@ -209,7 +210,6 @@ Extra-Source-Files:
|
||||||
tests/epub/*.native
|
tests/epub/*.native
|
||||||
tests/txt2tags.t2t
|
tests/txt2tags.t2t
|
||||||
tests/twiki-reader.twiki
|
tests/twiki-reader.twiki
|
||||||
Extra-Tmp-Files: man/pandoc.1
|
|
||||||
|
|
||||||
Source-repository head
|
Source-repository head
|
||||||
type: git
|
type: git
|
||||||
|
|
Loading…
Add table
Reference in a new issue