Skip to content

Commit

Permalink
Merge pull request #3 from XavierBerger/devel
Browse files Browse the repository at this point in the history
Version 2.8
  • Loading branch information
XavierBerger committed Sep 13, 2014
2 parents 0092bee + b92c84e commit c509e7e
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 30 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,39 @@ Build package:

cd RPi-Monitor-deb
./build-deb.sh

## Repository

Build script also create a debian repository. To use this repository follow the instruction bellow:

Activate https transport for apt:

sudo apt-get install apt-transport-https ca-certificates

Execute the following command to add rpimonitor into your list of repository:

sudo wget https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/master/init/apt/sources.list.d/rpimonitor.list -O /etc/apt/sources.list.d/rpimonitor.list

This will add the file `/etc/apt/source.list.d/rpimonitor.list` containing:

# RPi-Monitor official repository
deb https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/

**Note**: To test unstable version, replace *master* by *devel* into the upper line.

Install **RPi-Monitor**

sudo apt-get update
sudo apt-get install rpimonitor

For update (when a new release of RPi-Monitor is available)

sudo apt-get update
sudo apt-get upgrade

**Note**: *The package is not signed, it will be require to accept installation of
unauthenticated package*.


## Authors

Expand Down
41 changes: 30 additions & 11 deletions build-deb.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# (c) 2013 - Xavier Berger - http://rpi-experiences.blogspot.fr/
# (c) 2013-2014 - Xavier Berger - http://rpi-experiences.blogspot.fr/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -29,30 +29,35 @@ fi

vi debian/changelog

echo "Removing old ${DPKGSRC} directory"
echo
echo -e "\033[1mRemoving old ${DPKGSRC} directory\033[0m"
sudo rm -fr ${DPKGSRC}

echo "Creating a new ${DPKGSRC} directory"
echo
echo -e "\033[1mCreating a new ${DPKGSRC} directory\033[0m"
mkdir ${DPKGSRC}

echo "Constructing debian package structure"
echo
echo -e "\033[1mConstructing debian package structure\033[0m"
cd ${DPKGSRC}
cp -a ../debian DEBIAN
sed -i "s/{DATE}/$(LANG=EN; date)/" DEBIAN/changelog
cp -a ${RPIMONITOR}/init etc
mkdir -p usr/bin usr/share/rpimonitor/scripts etc/rpimonitor var/lib/rpimonitor
mkdir -p usr/bin etc/rpimonitor usr/share/rpimonitor var/lib/rpimonitor
cp ${RPIMONITOR}/rpimonitor/daemon.conf etc/rpimonitor
cp -a ${RPIMONITOR}/rpimonitor/template etc/rpimonitor/template
cp ${RPIMONITOR}/rpimonitor/rpimonitord usr/bin
cp -a ${RPIMONITOR}/rpimonitor/web/ usr/share/rpimonitor
cp -a ${RPIMONITOR}/scripts/ usr/share/rpimonitor
cp ${RPIMONITOR}/rpimonitor/updatestatus.txt var/lib/rpimonitor
rm usr/share/rpimonitor/web/stat/* > /dev/null 2>&1
rm usr/share/rpimonitor/web/*.json > /dev/null 2>&1

echo "Post processing"
echo
echo -e "\033[1mPost processing\033[0m"
sed -i "s/{DEVELOPMENT}/${VERSION}-1/" DEBIAN/control
sed -i "s/{DEVELOPMENT}/$VERSION/" usr/bin/rpimonitord
sed -i "s/{DEVELOPMENT}/$VERSION/" usr/share/rpimonitor/web/js/rpimonitor.js
find etc/rpimonitor/ -type f | sed 's/etc/\/etc/' > DEBIAN/conffiles

mkdir -p usr/share/man/man1
../help2man.pl usr/bin/rpimonitord $VERSION | gzip -c > usr/share/man/man1/rpimonitord.1.gz
Expand All @@ -61,13 +66,28 @@ cat ${RPIMONITOR}/rpimonitor/daemon.conf ${RPIMONITOR}/rpimonitor/template/raspb
../conf2man.pl rpimonitord.conf $VERSION | gzip -c > usr/share/man/man5/rpimonitord.conf.5.gz
rm -f rpimonitord.conf

echo "Building package"
echo
echo -e "\033[1mBuilding package\033[0m"
find . -type f ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums
sudo chown -R root:root etc usr
cd ..
dpkg -b ${DPKGSRC} packages/rpimonitor_${VERSION}-1_all.deb

echo "Creating package for Raspberry Pi Store"
echo
echo -e "\033[1mUpdating repository\033[0m"
cd repo
rm *.deb
ln ../packages/rpimonitor_${VERSION}-1_all.deb rpimonitor_${VERSION}-1_all.deb
cd ..
#mkdir -p XavierBerger/RPi-Monitor-deb/raw/devel/
#cd XavierBerger/RPi-Monitor-deb/raw/devel/
#ln -s ../../../../repo repo
#cd ../../../..
#dpkg-scanpackages XavierBerger/RPi-Monitor-deb/raw/devel/repo /dev/null | gzip -9c > repo/Packages.gz
dpkg-scanpackages repo /dev/null XavierBerger/RPi-Monitor-deb/raw/devel/ | gzip -9c > repo/Packages.gz

echo
echo -e "\033[1mCreating package for Raspberry Pi Store\033[0m"
cd store/rpimonitor
rm *.deb
ln ../../packages/rpimonitor_${VERSION}-1_all.deb rpimonitor_${VERSION}-1_all.deb
Expand All @@ -76,7 +96,6 @@ zip rpimonitor_${VERSION}-1_all.zip rpimonitor/*

cd ..
echo
echo -ne "Install RPi-Monitor $VERSION now? (Ctl+C to cancel)"
echo -ne "\033[1mInstall RPi-Monitor $VERSION now? (Ctl+C to cancel)\033[0m"
read continue
echo
sudo dpkg -i packages/rpimonitor_${VERSION}-1_all.deb
18 changes: 17 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
rpimonitor (2.8-1) UNRELEASED; urgency=low

* Add 'Badge' function for status page (similar to Label)
* Simplify and fix startup scripts
* Manage configuration indexes unicity per file (to make configuration easier)
* Add 'include' function to load configuration additionnal files
* Split configuration files and use 'include' in default configuration file
* Change ownership of cron script to avoid issue with logs
* Add parameters to customise menu logo, title and page title
* Add debian repository using github as repo
* Check if localStorage is activated and warn user is not
* Improve upgradable packages detection using aptitude for debian or pacman
for archLinux (Thanks ajs124 for archLinux implementation)

-- Xavier Berger <berger.xavier@gmail.com> {DATE}

rpimonitor (2.7-1) UNRELEASED; urgency=low

* Change directory storing configuration to /etc/rpimonitor/
Expand All @@ -12,7 +28,7 @@ rpimonitor (2.7-1) UNRELEASED; urgency=low
* Update disk usage formula for better compatibility
* Add 'Label' function for status page

-- Xavier Berger <berger.xavier@gmail.com> {DATE}
-- Xavier Berger <berger.xavier@gmail.com> Sat Aug 16 18:54:32 CEST 2014


rpimonitor (2.6-1) UNRELEASED; urgency=low
Expand Down
1 change: 0 additions & 1 deletion debian/conffiles
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/etc/rpimonitor/daemon.conf
/etc/rpimonitor/template/raspbian.conf
/etc/rpimonitor/template/xbian.conf
/etc/default/rpimonitor
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Package: rpimonitor
Version: {DEVELOPMENT}
Architecture: all
Section: misc
Depends: perl, librrds-perl, libhttp-daemon-perl (>= 6.0.0) | libwww-perl (<< 6.0.0), libjson-perl, libipc-sharelite-perl, libfile-which-perl
Depends: perl, librrds-perl, libhttp-daemon-perl (>= 6.0.0) | libwww-perl (<< 6.0.0), libjson-perl, libipc-sharelite-perl, libfile-which-perl, aptitude
Maintainer: Xavier Berger <berger.xavier@gmail.com>
Description: RPi-Monitor is a self monitoring application designed to run on Raspberry Pi.
2 changes: 2 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ if [ -f /etc/rpimonitor/template/$distrib.conf ]; then
else
ln -s /etc/rpimonitor/template/raspbian.conf /etc/rpimonitor/data.conf
fi
#Change cron right
chmod 600 /etc/cron.d/rpimonitor
# reinstall the service
update-rc.d -f rpimonitor remove
update-rc.d -f rpimonitor defaults
Expand Down
16 changes: 0 additions & 16 deletions packages/README.md

This file was deleted.

Binary file added packages/rpimonitor_2.8-1_all.deb
Binary file not shown.
Binary file added repo/Packages.gz
Binary file not shown.
Binary file added repo/rpimonitor_2.8-1_all.deb
Binary file not shown.
Binary file added store/rpimonitor_2.8-1_all.zip
Binary file not shown.

0 comments on commit c509e7e

Please sign in to comment.