git.iko.soy/typeable/pandoc
on master help sign in
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.

commitaafccdb0bdf992d18d779df97dc2deca245dc6a7 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 24 Oct 2015, 21:12 (11 years ago) parent68ca646
4 files changed+33−21
deb/stack.yaml+17 make_deb.sh+11−19 make_osx_package.sh+5−2 stack.pkg.yaml → osx/stack.yaml
deb/stack.yamlnew file+17
@@ -0,0 +1,17 @@
1+flags:
2+ pandoc:
3+ trypandoc: false
4+ https: true
5+ embed_data_files: true
6+ old-locale: false
7+ network-uri: true
8+ pandoc-citeproc:
9+ bibutils: true
10+ embed_data_files: true
11+ unicode_collation: false
12+ test_citeproc: false
13+ debug: false
14+packages:
15+- '.'
16+- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.0.1/pandoc-citeproc-0.8.0.1.tar.gz'
17+resolver: lts-3.10
make_deb.sh+11−19
@@ -7,7 +7,7 @@ case "$MACHINE" in
77 i386) ARCHITECTURE=i386;;
88esac
99
10−SANDBOX=`pwd`/.cabal-sandbox
10+LOCAL=$HOME/.local
1111VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
1212DEBPKGVER=1
1313DEBVER=$VERSION-$DEBPKGVER
@@ -17,32 +17,24 @@ DEST=$DIST/usr
1717ME=$(whoami)
1818COPYRIGHT=$DEST/share/doc/pandoc/copyright
1919
20−# echo Removing old files...
21−rm -rf $DIST
22−
23−cabal sandbox init
24−echo Updating database
25−cabal update
26−
27−export PATH=`pwd`/.cabal-sandbox/bin:$PATH
28−which hsb2hs || cabal install hsb2hs
29−echo Building pandoc...
30−cabal clean
31−cabal install --force --reinstall --flags="embed_data_files make-pandoc-man-pages" . pandoc-citeproc
20+stack setup
21+stack clean
22+which hsb2hs || stack install --stack-yaml stack.hsb2hs.yaml
23+stack install --stack-yaml deb/stack.yaml
3224
3325# get pandoc-citeproc man page:
34−PANDOC_CITEPROC_PATH=`cabal unpack -d make_binary_package.tmp.$$ pandoc-citeproc | awk '{print $3;}'`
35−strip $SANDBOX/bin/pandoc
36−strip $SANDBOX/bin/pandoc-citeproc
26+PANDOC_CITEPROC_PATH=`stack unpack -d make_binary_package.tmp.$$ pandoc-citeproc | awk '{print $3;}'`
27+strip $LOCAL/bin/pandoc
28+strip $LOCAL/bin/pandoc-citeproc
3729mkdir -p $DEST/bin
3830mkdir -p $DEST/share/man/man1
3931mkdir -p $DEST/share/doc/pandoc
4032
4133mkdir -p $DEST/share/doc/pandoc-citeproc
4234find $DIST -type d | xargs chmod 755
43−cp $SANDBOX/bin/pandoc $DEST/bin/
44−cp $SANDBOX/bin/pandoc-citeproc $DEST/bin/
45−cp $SANDBOX/share/man/man1/pandoc.1 $DEST/share/man/man1/pandoc.1
35+cp $LOCAL/bin/pandoc $DEST/bin/
36+cp $LOCAL/bin/pandoc-citeproc $DEST/bin/
37+cp $LOCAL/share/man/man1/pandoc.1 $DEST/share/man/man1/pandoc.1
4638gzip -9 $DEST/share/man/man1/pandoc.1
4739cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
4840gzip -9 $DEST/share/man/man1/pandoc-citeproc.1
make_osx_package.sh+5−2
@@ -15,13 +15,16 @@ PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
1515# echo Removing old files...
1616rm -rf $DIST
1717mkdir -p $RESOURCES
18+stack setup
19+which hsb2hs | stack install --stack-yaml=stack.hsb2hs.yaml
1820
1921echo Building pandoc...
20−stack install --stack-yaml=stack.pkg.yaml
22+stack clean
23+stack install --stack-yaml=osx/stack.yaml
2124
2225echo Getting man pages...
2326make man/pandoc.1
24−PANDOC_CITEPROC_PATH=`cabal unpack -d $DIST pandoc-citeproc | awk '{print $3;}'`
27+PANDOC_CITEPROC_PATH=`stack unpack -d $DIST pandoc-citeproc | awk '{print $3;}'`
2528
2629mkdir -p $DEST/bin
2730mkdir -p $DEST/share/man/man1
stack.pkg.yaml → osx/stack.yamlrenamed

The content is the same.