Commit 89a759c7 authored by Julien Bonjean's avatar Julien Bonjean
Browse files

[#2181] Added launchpad debian files

parent dc5ab9fe
#!/bin/bash
# postinst script for sflphone-common
#
# see: dh_installdeb(1)
# Script to copy and move, if exists, configuration file sflphonedrc and history in the XDG directory
# Freedesktop specifications: http://standards.freedesktop.org/basedir-spec/latest/
set -e
INST_CONFIG="$HOME/.sflphone/sflphonedrc";
INST_DATA="$HOME/.sflphone/history";
INST_CACHE="$HOME/.sflphone/sfl.pid";
NEW_INST_CONFIG=
NEW_INST_DATA=
NEW_INST_CACHE=
# Set the XDG CONFIG directory to the default one or to the path set in the environment variable
if [ -z $XDG_CONFIG_HOME ]; then
NEW_INST_CONFIG=$HOME"/.config/sflphone/"; # This is the standard path
else
NEW_INST_CONFIG=$XDG_CONFIG_HOME;
fi;
# Set the XDG DATA directory to the default one or to the path set in the environment variable
if [ -z $XDG_DATA_HOME ]; then
NEW_INST_DATA=$HOME"/.local/share/sflphone/"; # This is the standard path
else
NEW_INST_DATA=$XDG_DATA_HOME;
fi;
# Move the configuration file
if [ -f $INST_CONFIG ] ; then
echo "Moving the configuration file into $NEW_INST_CONFIG directory";
if [ ! -d $NEW_INST_CONFIG ]; then
mkdir $NEW_INST_CONFIG;
fi
mv $INST_CONFIG $NEW_INST_CONFIG;
fi
# Move the history
if [ -f $INST_DATA ] ; then
echo "Moving the history file into $NEW_INST_DATA directory";
if [ ! -d $NEW_INST_DATA ]; then
mkdir $NEW_INST_DATA;
fi
mv $INST_DATA $NEW_INST_DATA;
fi
# Remove the directory
# rmdir $HOME"/.sflphone";
echo "You may remove the $HOME/.sflphone, the application won't use it anymore, but the XDG directories instead. Thank you.";
exit 0
#!/bin/sh
# postrm script for sflphone
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
if [ "$1" = "purge" ]
then
# remove the user config file
rm -f $HOME/.sflphone/sflphonedrc
fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# postrm script for sflphone
#
# see: dh_installdeb(1)
set -e
package=sflphone
case "$1" in
install|upgrade)
# Clear the old dbus-c++ and iax2 if presents
;;
esac
exit 0
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_OPTIONS
package=sflphone-common
CXX = g++-4.0
CFLAGS = -Wall -g
DEB_INSTALL_MANPAGES_sflphone_common = sflphoned.1
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
./autogen.sh
./configure --prefix=/usr
cd libs/pjproject; ./autogen.sh; ./configure --prefix=/usr
touch configure-stamp
#Architecture
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
# Add here commands to compile the arch part of the package.
cd libs/pjproject; $(MAKE) dep; $(MAKE) clean; $(MAKE)
$(MAKE)
touch $@
build-indep: build-indep-stamp
build-indep-stamp: configure-stamp
# Add here commands to compile the indep part of the package.
#$(MAKE) doc
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp configure-stamp
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs -i
# Add here commands to install the package into debian/sflphone.
install-arch:
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs -s
# Add here commands to install the arch part of the package into
# debian/tmp.
$(MAKE) DESTDIR=$(CURDIR)/debian/$(package) install
cd libs/pjproject; $(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
rm -rf $(CURDIR)/debian/$(package)/usr/include
dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
dh_makeshlibs
dh_installdeb
# dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment