mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
semi-working build script for deb packages
This commit is contained in:
parent
8b821d42a2
commit
61df1facd2
7 changed files with 226 additions and 0 deletions
43
bin/buildDebian.sh
Executable file
43
bin/buildDebian.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# IMPORTANT
|
||||
# Protect agaisnt mispelling a var and rm -rf /
|
||||
set -u
|
||||
set -e
|
||||
|
||||
SRC=/tmp/etherpad-deb-src
|
||||
DIST=/tmp/etherpad-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 ../ ${SYSROOT}/opt/etherpad/ --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}/etherpad-1.deb debian-binary control.tar.gz data.tar.gz
|
||||
popd
|
||||
rsync -a ${DIST}/etherpad-1.deb ./
|
Loading…
Add table
Add a link
Reference in a new issue