summaryrefslogtreecommitdiff
path: root/make_deb.sh
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-12-19 15:17:11 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-12-19 15:17:11 -0800
commitf72dfc2d94f2c4488f8da381ca5c82e075a1f64c (patch)
tree6e44953602244686527f83cc84899ef2283e09e9 /make_deb.sh
parent11fc7308b7c4ff663344b4a65ce064f619e61c48 (diff)
make_deb.sh fixes:
* Use fakeroot to get permissions right. * Use mkdir and cp instead of install. * Set permissions of directories to 755. * Install in /usr rather than /usr/local.
Diffstat (limited to 'make_deb.sh')
-rwxr-xr-xmake_deb.sh32
1 files changed, 18 insertions, 14 deletions
diff --git a/make_deb.sh b/make_deb.sh
index fcf82accc..f5a075224 100755
--- a/make_deb.sh
+++ b/make_deb.sh
@@ -16,7 +16,7 @@ DEBVER=$VERSION-$DEBPKGVER
BASE=pandoc-$DEBVER-$ARCHITECTURE
DIST=`pwd`/$BASE
MANDIR=`pwd`/man
-DEST=$DIST/usr/local
+DEST=$DIST/usr
ME=$(whoami)
# echo Removing old files...
@@ -37,23 +37,27 @@ make man
PANDOC_CITEPROC_PATH=`cabal unpack -d make_binary_package.tmp.$$ pandoc-citeproc | awk '{print $3;}'`
strip $SANDBOX/bin/pandoc
strip $SANDBOX/bin/pandoc-citeproc
-install -d $DEST/bin
-install -d $DEST/share/man/man1
-install -d $DEST/share/man/man5
-install -d $DEST/share/doc/pandoc
-install -d $DEST/share/doc/pandoc-citeproc
-install $SANDBOX/bin/pandoc $DEST/bin/
-install $SANDBOX/bin/pandoc-citeproc $DEST/bin/
-install $MANDIR/man1/pandoc.1 $DEST/share/man/man1/
-install $MANDIR/man5/pandoc_markdown.5 $DEST/share/man/man5/
-install $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
-install COPYING $DEST/share/doc/pandoc/COPYING
-install $PANDOC_CITEPROC_PATH/LICENSE $DEST/share/doc/pandoc-citeproc/LICENSE
+mkdir -p $DEST/bin
+mkdir -p $DEST/share/man/man1
+mkdir -p $DEST/share/man/man5
+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 $MANDIR/man1/pandoc.1 $DEST/share/man/man1/
+cp $MANDIR/man5/pandoc_markdown.5 $DEST/share/man/man5/
+cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
+cp COPYING $DEST/share/doc/pandoc/COPYING
+cp COPYRIGHT $DEST/share/doc/pandoc/copyright
+cp README $DEST/share/doc/pandoc/README
+cp changelog $DEST/share/doc/pandoc/changelog
+cp $PANDOC_CITEPROC_PATH/LICENSE $DEST/share/doc/pandoc-citeproc/LICENSE
rm -rf make_binary_package.tmp.$$
mkdir $DIST/DEBIAN
perl -pe "s/VERSION/$DEBVER/" deb/control.in | \
perl -pe "s/ARCHITECTURE/$ARCHITECTURE/" > $DIST/DEBIAN/control
-dpkg-deb --build $DIST
+fakeroot dpkg-deb --build $DIST
rm -rf $DIST