diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-10-24 21:12:43 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-10-24 21:12:43 -0700 |
commit | aafccdb0bdf992d18d779df97dc2deca245dc6a7 (patch) | |
tree | 797fd919ae1a553dca031c0f7d9a76c79ba7a6c4 | |
parent | 68ca646e65264ab225f775529201099d1c5ead7d (diff) | |
download | pandoc-aafccdb0bdf992d18d779df97dc2deca245dc6a7.tar.gz |
Changes for deb and osx package generators.
- Use stack for make_deb.sh.
- Use osx/stack.yaml or deb/stack.yaml.
- deb/stack.yaml doesn't want the same ghc-options.
-rw-r--r-- | deb/stack.yaml | 17 | ||||
-rwxr-xr-x | make_deb.sh | 30 | ||||
-rwxr-xr-x | make_osx_package.sh | 7 | ||||
-rw-r--r-- | osx/stack.yaml (renamed from stack.pkg.yaml) | 0 |
4 files changed, 33 insertions, 21 deletions
diff --git a/deb/stack.yaml b/deb/stack.yaml new file mode 100644 index 000000000..c2f506cab --- /dev/null +++ b/deb/stack.yaml @@ -0,0 +1,17 @@ +flags: + pandoc: + trypandoc: false + https: true + embed_data_files: true + old-locale: false + network-uri: true + pandoc-citeproc: + bibutils: true + embed_data_files: true + unicode_collation: false + test_citeproc: false + debug: false +packages: +- '.' +- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.0.1/pandoc-citeproc-0.8.0.1.tar.gz' +resolver: lts-3.10 diff --git a/make_deb.sh b/make_deb.sh index a5aaf1549..a184b54d6 100755 --- a/make_deb.sh +++ b/make_deb.sh @@ -7,7 +7,7 @@ case "$MACHINE" in i386) ARCHITECTURE=i386;; esac -SANDBOX=`pwd`/.cabal-sandbox +LOCAL=$HOME/.local VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}') DEBPKGVER=1 DEBVER=$VERSION-$DEBPKGVER @@ -17,32 +17,24 @@ DEST=$DIST/usr ME=$(whoami) COPYRIGHT=$DEST/share/doc/pandoc/copyright -# echo Removing old files... -rm -rf $DIST - -cabal sandbox init -echo Updating database -cabal update - -export PATH=`pwd`/.cabal-sandbox/bin:$PATH -which hsb2hs || cabal install hsb2hs -echo Building pandoc... -cabal clean -cabal install --force --reinstall --flags="embed_data_files make-pandoc-man-pages" . pandoc-citeproc +stack setup +stack clean +which hsb2hs || stack install --stack-yaml stack.hsb2hs.yaml +stack install --stack-yaml deb/stack.yaml # get pandoc-citeproc man page: -PANDOC_CITEPROC_PATH=`cabal unpack -d make_binary_package.tmp.$$ pandoc-citeproc | awk '{print $3;}'` -strip $SANDBOX/bin/pandoc -strip $SANDBOX/bin/pandoc-citeproc +PANDOC_CITEPROC_PATH=`stack unpack -d make_binary_package.tmp.$$ pandoc-citeproc | awk '{print $3;}'` +strip $LOCAL/bin/pandoc +strip $LOCAL/bin/pandoc-citeproc mkdir -p $DEST/bin mkdir -p $DEST/share/man/man1 mkdir -p $DEST/share/doc/pandoc mkdir -p $DEST/share/doc/pandoc-citeproc find $DIST -type d | xargs chmod 755 -cp $SANDBOX/bin/pandoc $DEST/bin/ -cp $SANDBOX/bin/pandoc-citeproc $DEST/bin/ -cp $SANDBOX/share/man/man1/pandoc.1 $DEST/share/man/man1/pandoc.1 +cp $LOCAL/bin/pandoc $DEST/bin/ +cp $LOCAL/bin/pandoc-citeproc $DEST/bin/ +cp $LOCAL/share/man/man1/pandoc.1 $DEST/share/man/man1/pandoc.1 gzip -9 $DEST/share/man/man1/pandoc.1 cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/ gzip -9 $DEST/share/man/man1/pandoc-citeproc.1 diff --git a/make_osx_package.sh b/make_osx_package.sh index 2512e81e0..3683f1a6e 100755 --- a/make_osx_package.sh +++ b/make_osx_package.sh @@ -15,13 +15,16 @@ PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker # echo Removing old files... rm -rf $DIST mkdir -p $RESOURCES +stack setup +which hsb2hs | stack install --stack-yaml=stack.hsb2hs.yaml echo Building pandoc... -stack install --stack-yaml=stack.pkg.yaml +stack clean +stack install --stack-yaml=osx/stack.yaml echo Getting man pages... make man/pandoc.1 -PANDOC_CITEPROC_PATH=`cabal unpack -d $DIST pandoc-citeproc | awk '{print $3;}'` +PANDOC_CITEPROC_PATH=`stack unpack -d $DIST pandoc-citeproc | awk '{print $3;}'` mkdir -p $DEST/bin mkdir -p $DEST/share/man/man1 diff --git a/stack.pkg.yaml b/osx/stack.yaml index e7ce11752..e7ce11752 100644 --- a/stack.pkg.yaml +++ b/osx/stack.yaml |