diff --git a/.gitignore b/.gitignore index 87ae30f..dc7b9b3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,9 @@ *.o *.so *.so.* +build-arch-stamp +build-indep-stamp +debian/debhelper.log +debian/files +debian/substvars +debian/tmp/ diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile index 5f8f314..21d0423 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +DESTDIR := + SOURCE_FILES=a5.c bits.c gea.c kasumi.c utils.c ifc.cpp OBJECT_FILES=a5.o bits.o gea.o kasumi.o utils.o ifc.o INCLUDE_FILES=a5.h bits.h gea.h gprs_cipher.h kasumi.h linuxlist.h utils.h @@ -11,14 +13,14 @@ liba53.so.1.0: ${SOURCE_FILES} ${INCLUDE_FILES} Makefile # install A5/3 library install: liba53.so.1.0 - cp liba53.so.1.0 /usr/lib - ln -sf /usr/lib/liba53.so.1.0 /usr/lib/liba53.so.1 - ln -sf /usr/lib/liba53.so.1.0 /usr/lib/liba53.so - cp a53.h /usr/include + cp liba53.so.1.0 $(DESTDIR)/usr/lib + cp -P liba53.so.1 $(DESTDIR)/usr/lib + cp -P liba53.so $(DESTDIR)/usr/lib + cp a53.h $(DESTDIR)/usr/include # test installed A5/3 library installtest: install - g++ -o a53test a53test.cpp -I/usr/include -L/usr/lib -la53 + g++ -o a53test a53test.cpp -I$(DESTDIR)/usr/include -L$(DESTDIR)/usr/lib -la53 ./a53test clean: diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..356df7b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +liba53 (0.1) unstable; urgency=low + + * Initial release + + -- Michael Iedema Thu, 8 Aug 2013 00:11:00 -0700 diff --git a/debian/control b/debian/control new file mode 100755 index 0000000..cd0defe --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: liba53 +Section: comm +Priority: optional +Maintainer: Range Networks, Inc. +Homepage: http://www.rangenetworks.com/ +Build-Depends: build-essential, debhelper (>= 7), pkg-config +Standards-Version: 3.7.3 + +Package: liba53 +Section: comm +Priority: optional +Architecture: i386 +Essential: no +Depends: libc6-i686, pkg-config +Description: A5/3 call encryption library diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..cca277e --- /dev/null +++ b/debian/postinst @@ -0,0 +1,42 @@ +#!/bin/sh +# postinst script for test +# +# see: dh_installdeb(1) + +# TODO: For now disable "set -e" since I have not figured out how to get sqlite3 to SHUT UP! +#set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + + +case "$1" in + configure) + ldconfig + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..51bdf7b --- /dev/null +++ b/debian/postrm @@ -0,0 +1,38 @@ +#!/bin/sh +# postrm script for test +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ldconfig + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/preinst b/debian/preinst new file mode 100755 index 0000000..db74382 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,35 @@ +#!/bin/sh +# preinst script for test +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..f92b661 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for test +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..6087384 --- /dev/null +++ b/debian/rules @@ -0,0 +1,123 @@ +#!/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. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Never distribute source control meta information +export DH_ALWAYS_EXCLUDE=.svn:.git + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +configure: + +config: configure-stamp +configure-stamp: configure + dh_testdir + +#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. + #$(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: config + dh_testdir + dh_testroot + rm -f build-arch-stamp build-indep-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + 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 indep part of the package into + # debian/-doc. + #INSTALLDOC# +# $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + dh_install -i + +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. + mkdir -p debian/tmp/usr/lib + mkdir -p debian/tmp/usr/include + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + 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 config +