diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-01-31 15:05:05 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-31 15:06:58 +0100 |
commit | c96b64e91b54481aa870566dbecae69df711223d (patch) | |
tree | 45557c3df8e5f94bc9218f37384db19bf8a88c1f /osx | |
parent | 99c2a31749bb409e4026907f011bb307b2096e8b (diff) | |
download | pandoc-c96b64e91b54481aa870566dbecae69df711223d.tar.gz |
Name change OSX -> MacOS.
Add a -MacOS suffix to mac package rather than -OSX.
CHanged local names from osx to macos.
Diffstat (limited to 'osx')
-rw-r--r-- | osx/distribution.xml.in | 30 | ||||
-rwxr-xr-x | osx/make_osx_package.sh | 76 | ||||
-rw-r--r-- | osx/stack.yaml | 28 | ||||
-rwxr-xr-x | osx/uninstall-pandoc.pl | 79 |
4 files changed, 0 insertions, 213 deletions
diff --git a/osx/distribution.xml.in b/osx/distribution.xml.in deleted file mode 100644 index 145fc0f21..000000000 --- a/osx/distribution.xml.in +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="no"?> -<installer-gui-script minSpecVersion="1"> - <title>pandoc</title> - <organization>net.johnmacfarlane.pandoc</organization> - <domains enable_localSystem="true" enable_anywhere="true" /> - <options customize="allow" require-scripts="false" rootVolumeOnly="false" /> - <!-- Define documents displayed at various steps --> - <!-- <welcome file="welcome.html" mime-type="text/html" /> --> - <license file="license.html" mime-type="text/html" /> - <!-- <conclusion file="conclusion.html" mime-type="text/html" /> --> - <options hostArchitectures="x86_64" /> - <!-- List all component packages --> - <pkg-ref id="net.johnmacfarlane.pandoc" - version="PANDOCVERSION" - auth="root">pandoc.pkg</pkg-ref> - <!-- List them again here. They can now be organized - as a hierarchy if you want. --> - <choices-outline> - <line choice="net.johnmacfarlane.pandoc"/> - </choices-outline> - <!-- Define each choice above --> - <choice - id="net.johnmacfarlane.pandoc" - visible="false" - title="pandoc" - description="pandoc - universal text converter" - start_selected="true"> - <pkg-ref id="net.johnmacfarlane.pandoc"/> - </choice> -</installer-gui-script> diff --git a/osx/make_osx_package.sh b/osx/make_osx_package.sh deleted file mode 100755 index 200702a0a..000000000 --- a/osx/make_osx_package.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -e - -LOCALBIN=$HOME/.local/bin -DIST=`pwd`/osx_package -OSX=`pwd`/osx -VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}') -RESOURCES=$DIST/Resources -ROOT=$DIST/pandoc -DEST=$ROOT/usr/local -SCRIPTS=$OSX/osx-resources -BASE=pandoc-$VERSION -ME=$(whoami) -PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker -DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane} -DEVELOPER_ID_INSTALLER=${DEVELOPER_ID_INSTALLER:-Developer ID Installer: John Macfarlane} - -# We need this for hsb2hs: -PATH=$LOCALBIN:$PATH -export MACOSX_DEPLOYMENT_TARGET=10.7 - -# echo Removing old files... -rm -rf $DIST -mkdir -p $DIST -mkdir -p $RESOURCES -stack setup -which hsb2hs || stack install hsb2hs - -echo Building pandoc... -stack clean -stack install --stack-yaml=$OSX/stack.yaml --local-bin-path . pandoc pandoc-citeproc - -echo Getting man pages... -make man/pandoc.1 - -# get pandoc-citeproc man page: -PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'` -PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz -curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST -PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION} - -mkdir -p $DEST/bin -mkdir -p $DEST/share/man/man1 -for f in pandoc pandoc-citeproc; do - cp $OSX/$f $DEST/bin/; -done -cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/ -cp man/pandoc.1 $DEST/share/man/man1/ - -chown -R $ME:staff $DIST - -echo Copying license... -$OSX/pandoc --data data -t html5 -s COPYING.md -o $RESOURCES/license.html - -# Removing executable signing because of a problem that arose in El Capitan -# "source=obsolete resource envelope" - -#echo Signing pandoc executable... - -#codesign --force --sign "${DEVELOPER_ID_APPLICATION}" $DEST/bin/pandoc -# make sure it's valid... returns nonzero exit code if it isn't: -#spctl --assess --type execute $DEST/bin/pandoc - -echo Creating OSX package... -# remove old package first -rm -rf $BASE.pkg - -sed -e "s/PANDOCVERSION/$VERSION/" $OSX/distribution.xml.in > $OSX/distribution.xml - -pkgbuild --root $DIST/pandoc --identifier net.johnmacfarlane.pandoc --version 1.13 --ownership recommended $DIST/pandoc.pkg -productbuild --distribution $OSX/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-osx.pkg - -# verify signature -spctl --assess --type install $BASE-osx.pkg - -# cleanup -rm -r $DIST $OSX/pandoc $OSX/pandoc-citeproc diff --git a/osx/stack.yaml b/osx/stack.yaml deleted file mode 100644 index c2062eff8..000000000 --- a/osx/stack.yaml +++ /dev/null @@ -1,28 +0,0 @@ -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 -ghc-options: - pandoc-citeproc: '-pgmP cpphs -optP--cpp' - highlighting-kate: '-pgmP cpphs -optP--cpp' -packages: -- '..' -- location: - git: https://github.com/jgm/pandoc-citeproc.git - commit: 9c8e86cf16fc3188836a15ee76d5b70c5315bdb8 - extra-dep: true -extra-deps: -- texmath-0.9 -- doctemplates-0.1.0.2 -- pandoc-types-1.17.0.4 -- skylighting-0.1.1.2 -resolver: lts-7.14 diff --git a/osx/uninstall-pandoc.pl b/osx/uninstall-pandoc.pl deleted file mode 100755 index a5194d9bd..000000000 --- a/osx/uninstall-pandoc.pl +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/perl - -# Script to remove all files installed by the OSX pandoc installer -# and unregister the package. Modified from a script contributed -# by Daniel T. Staal. - -use warnings; -use strict; - -use File::Spec; - -# The main info: this is the list of files to remove and the pkg_id. -my $pkg_id = 'net.johnmacfarlane.pandoc'; - -# Find which, if any, volume Pandoc is installed on. -my $volume; - -# First check /, then other volumes on the box. -my $cur_test = `pkgutil --pkgs=$pkg_id`; -if ( $cur_test =~ m/$pkg_id/ ) { - $volume = '/'; -} else { - opendir( my $dh, '/Volumes' ) or die "Can't list Volumes: $!\n"; - foreach my $dir ( readdir($dh) ) { - next if $dir =~ m/^\./; # Skip dotfiles. - - my $path = File::Spec->rel2abs( $dir, '/Volumes' ); - next if !( -d $path ); # Skip anything that isn't a directory. - - my $cur_test = `pkgutil --pkgs=$pkg_id --volume '$path'`; - if ( $cur_test =~ m/$pkg_id/ ) { - $volume = $path; - last; - } - } -} - -die "Pandoc not installed.\n" if !( defined($volume) ); - -# Get the list of files to remove. -my @pkg_files = `pkgutil --volume '$volume' --only-files --files '$pkg_id'`; -@pkg_files = map { chomp; File::Spec->rel2abs($_, $volume) } @pkg_files; - -# Confirm uninistall with the user. -print "The following files will be deleted:\n\n"; -print join("\n", @pkg_files); -print "\n\n"; -print "Do you want to proceed and uninstall pandoc (Y/N)?"; -my $input = <STDIN>; - -if ($input =~ m/^[Yy]/) { - - # Actually remove the files. - foreach my $file (@pkg_files) { - if ( -e $file ) { - if ( system( 'sudo', 'rm', $file ) == 0 ) { - warn "Deleted $file\n"; - } else { - warn "Unable to delete $file: $?\n"; - die "Aborting Uninstall.\n"; - } - } else { - warn "File $file does not exist. Skipping.\n"; - } - } - - # Clean up the install. - if (system('sudo', 'pkgutil', '--forget', $pkg_id, '--volume', $volume) != 0) { - die "Unable to clean up install: $?\n"; - } - -} else { - - print "OK, aborting uninstall.\n"; - exit; -} - -print "Pandoc has been successfully uninstalled.\n"; -exit; |