Skip to content

Commit

Permalink
add deb package deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
tartavull committed Sep 22, 2014
1 parent ced74d3 commit b9597d9
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 48 deletions.
17 changes: 0 additions & 17 deletions INotebook.desktop

This file was deleted.

21 changes: 0 additions & 21 deletions INotebook.desktop~

This file was deleted.

9 changes: 9 additions & 0 deletions dist/debinstall/deb-src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: inotebook
Version: 0.0.1
Section: base
Priority: optional
Architecture: amd64
Installed-Size: SIZE
Depends:
Maintainer: Ignacio Tartavull <[email protected]>
Description: INotebook let you open IPython notebook files
9 changes: 9 additions & 0 deletions dist/debinstall/deb-src/DEBIAN/control~
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: inotebook
Version: 0.0.1
Section: base
Priority: optional
Architecture: amd64
Installed-Size: SIZE
Depends:
Maintainer: Ignacio Tartavull <[email protected]>
Description: INotebook let you open IPython notebook files
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Desktop Entry]
Name=INotebook
GenericName=IPython Editor
Comment=Edit notebooks
Exec=/opt/inotebook/INotebook --notebook=%U"
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=inotebook
Categories=TextEditor;
Actions=Window;Document;
Keywords=IPython;Notebook;
Name[en_US]=inotebook.desktop
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/debinstall/inotebook.deb
Binary file not shown.
43 changes: 43 additions & 0 deletions dist/debinstall/redeb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

# IMPORTANT
# Protect agaisnt mispelling a var and rm -rf /
set -u
set -e

SRC=/tmp/inotebook-deb-src
DIST=/tmp/inotebook-deb-dist
SYSROOT=${SRC}/sysroot
DEBIAN=${SRC}/DEBIAN

rm -rf ${DIST}
mkdir -p ${DIST}/

rm -rf ${SRC}
rsync -a deb-src/ ${SRC}/
mkdir -p ${SYSROOT}/opt/

rsync -a ~/INotebook/dist/INotebook/linux64/ ${SYSROOT}/opt/inotebook/ --delete

find ${SRC}/ -type d -exec chmod 0755 {} \;
find ${SRC}/ -type f -exec chmod go-w {} \;
chown -R root:root ${SRC}/

let SIZE=`du -s ${SYSROOT} | sed s'/\s\+.*//'`+8
pushd ${SYSROOT}/
tar czf ${DIST}/data.tar.gz [a-z]*
popd
sed s"/SIZE/${SIZE}/" -i ${DEBIAN}/control
pushd ${DEBIAN}
tar czf ${DIST}/control.tar.gz *
popd

pushd ${DIST}/
echo 2.0 > ./debian-binary

find ${DIST}/ -type d -exec chmod 0755 {} \;
find ${DIST}/ -type f -exec chmod go-w {} \;
chown -R root:root ${DIST}/
ar r ${DIST}/inotebook.deb debian-binary control.tar.gz data.tar.gz
popd
rsync -a ${DIST}/inotebook.deb ./
10 changes: 0 additions & 10 deletions package.json~

This file was deleted.

0 comments on commit b9597d9

Please sign in to comment.