aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-04 02:51:28 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-04 02:51:28 +0000
commit4dca8f6e75948d489e8127119ce3787cb97ee1e2 (patch)
tree85a9b26dfe9f5074fc993661b2129c97742351fc /Setup.hs
parent9b7ec2d366e48dd77befb6710b9b567e26a53084 (diff)
downloadpandoc-4dca8f6e75948d489e8127119ce3787cb97ee1e2.tar.gz
Reworked Text.Pandoc.ODT to use zip-archive instead of calling external 'zip'.
+ Removed utf8-string and xml-light modules, and unneeded content.xml. + Removed code for building reference.odt from Setup.hs. The ODT is now built using template haskell in Text.Pandoc.ODT. + Removed copyright statements for utf8-string and xml modules, since they are no longer included in the source. + README: Removed claim that 'zip' is needed for ODT production. + Removed dependency on 'zip' from debian/control. + Text.Pandoc.Shared: Removed withTempDir, added inDirectory. + Added makeZip to Text.Pandoc.TH. + pandoc.cabal: Added dependencies on old-time, zip-archive, and utf8-string. Added markdown2pdf files to extra-sources list. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1417 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/Setup.hs b/Setup.hs
index c51c53bb1..9be68f8ce 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -12,7 +12,6 @@ import Data.Maybe ( fromJust, isNothing, catMaybes )
main = defaultMainWithHooks $
simpleUserHooks { runTests = runTestSuite
- , preConf = checkReferenceODT
, postBuild = makeManPages }
-- | Run test suite.
@@ -20,34 +19,6 @@ runTestSuite _ _ _ _ = do
inDirectory "tests" $ runCommand "runhaskell -i.. RunTests.hs" >>= waitForProcess
return ()
--- | If reference.odt needs rebuilding, build it.
-checkReferenceODT _ _ = inDirectory "odt-styles" $ do
- let refodt = "reference.odt"
- let deps = [ "meta.xml", "content.xml", "settings.xml", "META-INF/manifest.xml",
- "Thumbnails/thumbnail.png", "styles.xml", "mimetype" ]
- modifiedDeps <- modifiedDependencies refodt deps
- if null modifiedDeps
- then return ()
- else makeReferenceODT modifiedDeps
- return emptyHookedBuildInfo
-
--- | Create reference.odt by zipping up sources in odt-styles directory.
-makeReferenceODT :: [FilePath] -> IO ()
-makeReferenceODT sources = do
- zipPathMaybe <- findExecutable "zip"
- if isNothing zipPathMaybe
- then error $ "The 'zip' command, which is needed to build reference.odt\n" ++
- "from sources in the odt-styles directory, was not found.\n" ++
- "Try again after installing zip (http://www.info-zip.org/Zip.html).\n" ++
- "Or use the pandoc source tarball, which contains a prebuilt reference.odt."
- else do
- putStrLn "Creating reference.odt:"
- ec <- runProcess (fromJust zipPathMaybe) (["-9", "-r", "reference.odt"] ++ sources)
- Nothing Nothing Nothing Nothing (Just stderr) >>= waitForProcess
- case ec of
- ExitSuccess -> return ()
- _ -> error "Error creating ODT."
-
-- | Build man pages from markdown sources in man/man1/.
makeManPages _ _ _ _ = do
mapM makeManPage ["pandoc.1", "hsmarkdown.1", "html2markdown.1", "markdown2pdf.1"]