Many .deb build changes

This commit is contained in:
dschmenk 2013-09-21 22:52:21 -07:00
parent 384be612f2
commit 30e1613d6f
21 changed files with 97 additions and 81 deletions

View File

@ -7,6 +7,9 @@ a2pi:
$(MAKE) -C src
clean:
-rm $(PACKAGE)_*
-rm *.deb
-rm -rf $(DISTDIR)
-rm *.tar.gz
$(MAKE) -C src clean
@ -14,7 +17,7 @@ install:
$(MAKE) -C src install
dist:
-rm -rf $(DISTDIR)
$(MAKE) clean
mkdir $(DISTDIR)
-chmod 777 $(DISTDIR)
cp LICENSE.txt $(DISTDIR)
@ -26,4 +29,9 @@ dist:
cp -R ./src $(DISTDIR)
-chmod -R a+r $(DISTDIR)
tar czf $(DIST).tar.gz $(DISTDIR)
rm -rf $(DISTDIR)
deb:
$(MAKE) dist
mv $(DIST).tar.gz $(PACKAGE)_$(VERSION).orig.tar.gz
cd $(DIST); debuild -us -uc
rm $(PACKAGE)_$(VERSION).orig.tar.gz

5
debian/README.Debian vendored Executable file → Normal file
View File

@ -1,6 +1,7 @@
a2pi for Debian
---------------
<possible notes regarding this package - if none, delete this file>
Make sure you add your username to groups "fuse" and "input"
for easier installation.
-- David Schmenk <dschmenk@apple2pie> Thu, 19 Sep 2013 18:28:32 -0700
-- David Schmenk <dschmenk@gmail.com> Thu, 19 Sep 2013 18:28:32 -0700

View File

@ -1,9 +0,0 @@
a2pi for Debian
---------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>

View File

@ -1 +0,0 @@
#DOCS#

View File

@ -1 +0,0 @@
#DOCS#

20
debian/a2pi.doc-base vendored
View File

@ -1,20 +0,0 @@
Document: a2pi
Title: Debian a2pi Manual
Author: <insert document author here>
Abstract: This manual describes what a2pi is
and how it can be used to
manage online manuals on Debian systems.
Section: unknown
Format: debiandoc-sgml
Files: /usr/share/doc/a2pi/a2pi.sgml.gz
Format: postscript
Files: /usr/share/doc/a2pi/a2pi.ps.gz
Format: text
Files: /usr/share/doc/a2pi/a2pi.text.gz
Format: HTML
Index: /usr/share/doc/a2pi/html/index.html
Files: /usr/share/doc/a2pi/html/*.html

4
debian/changelog vendored Executable file → Normal file
View File

@ -1,5 +1,5 @@
a2pi (0.9.0-1) unstable; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
* Initial release (Closes: #0901)
-- David Schmenk <dschmenk@apple2pie> Thu, 19 Sep 2013 18:28:32 -0700
-- David Schmenk <dschmenk@gmail.com> Thu, 19 Sep 2013 18:28:32 -0700

0
debian/compat vendored Executable file → Normal file
View File

16
debian/control vendored Executable file → Normal file
View File

@ -1,21 +1,23 @@
Source: a2pi
Section: unknown
Priority: extra
Maintainer: David Schmenk <dschmenk@apple2pie>
Maintainer: David Schmenk <dschmenk@gmail.com>
Build-Depends: debhelper (>= 8.0.0), libfuse-dev (>= 2.9.0)
Standards-Version: 3.9.3
Homepage: http://schmenk.is-a-geek.com
#Vcs-Git: git://git.debian.org/collab-maint/a2pi.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/a2pi.git;a=summary
#Vcs-Git: https://github.com/dschmenk/apple2pi.git
#Vcs-Crowser: https://github.com/dschmenk/apple2pi
Package: a2pi
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libfuse2 (>= 2.9.0)
Description: Apple II Pi daemon and utilites
Depends: ${misc:Depends}, libfuse2 (>= 2.9.0)
Description: Apple II Pi daemon and utilities
Apple II Pi is a suite of programs to integrate an Apple II with
the Raspberry Pi.
Package: a2pi-doc
Section: doc
Architecture: all
Description: documentation for a2pi
Apple II Pi documentaton and sample code.
Description: documentation and sample code for Apple II Pi
Apple II Pi is a suite of programs to integrate an Apple II with
the Raspberry Pi.

19
debian/copyright vendored Executable file → Normal file
View File

@ -1,20 +1,9 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: a2pi
Source: <url://example.com>
Source: <http://github.com/dschmenk/apple2pi>
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2013 David Schmenk <dschmenk@apple2pie>
Copyright: 2013 David Schmenk <dschmenk@gmail.com>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -32,7 +21,3 @@ License: GPL-2+
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.

3
debian/dirs vendored Executable file
View File

@ -0,0 +1,3 @@
usr/share
usr/bin
sbin

0
debian/docs vendored Executable file → Normal file
View File

29
debian/init.d vendored Executable file → Normal file
View File

@ -1,24 +1,25 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: a2pi
# Required-Start: $network $local_fs
# Required-Stop:
# Provides: a2pid
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <Enter a short description of the software>
# Description: <Enter a long description of the software>
# <...>
# <...>
# Short-Description: Apple II Pi communications server
# Description: a2pid is the server that initiates communication
# with the Apple II to provide keyboard and mouse
# input as well as be the gatekeeper for other
# programs to interact with the Apple II.
### END INIT INFO
# Author: David Schmenk <dschmenk@apple2pie>
# Author: David Schmenk <dschmenk@gmail.com>
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC=a2pi # Introduce a short description here
NAME=a2pi # Introduce the short server's name here
DAEMON=/usr/sbin/a2pi # Introduce the server's location here
DAEMON_ARGS="" # Arguments to run the daemon with
DESC=a2pid # Introduce a short description here
NAME=a2pid # Introduce the short server's name here
DAEMON=/usr/sbin/a2pid # Introduce the server's location here
DAEMON_ARGS="--daemon" # Arguments to run the daemon with
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
@ -44,14 +45,14 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
#start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
wait 1
}
#

26
debian/postinst vendored Executable file → Normal file
View File

@ -20,6 +20,32 @@ set -e
case "$1" in
configure)
#
# Update /boot partition files.
#
ttyline=`grep ttyAMA0 /boot/cmdline.txt`
if [ "$ttyline" != "" ] ; then
mv /boot/cmdline.txt /boot/cmdline.bak
echo "dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" > /boot/cmdline.txt
fi
#
# Disable getty on built-in serial port.
#
ttyline=`grep ttyAMA0 /etc/inittab`
case "$gettyline" in
T*)
mv /etc/inittab /etc/inittab.bak
sed 's/^T0*/#T0*/' /etc/inittab.bak > /etc/inittab
;;
*)
;;
esac
#
# Disable joystick as a mouse in X
#
if [ -d /usr/share/X11/xorg.conf.d ] ; then
cp /usr/share/a2pi/11-joy.conf /usr/share/X11/xorg.conf.d
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)

1
debian/prerm vendored Executable file → Normal file
View File

@ -31,6 +31,7 @@ case "$1" in
rm /usr/local/bin/a2mount
rm /usr/local/bin/bload
rm /usr/local/bin/brun
rm /usr/local/sbin/a2pid
;;
failed-upgrade)

4
debian/rules vendored
View File

@ -11,7 +11,7 @@
# build-arch and build-indep targets by Bill Allombert 2001
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
@ -20,3 +20,5 @@ export DH_OPTIONS
%:
dh $@
override_dh_auto_install:
$(MAKE) DESTDIR=$$(pwd)/debian/a2pi install

0
debian/source/format vendored Executable file → Normal file
View File

0
debian/watch vendored Executable file → Normal file
View File

View File

@ -1,10 +1,17 @@
DESTDIR=/usr/local
SBINDIR=$(DESTDIR)/sbin
ifneq "$(findstring environment,$(origin DESTDIR))" ""
BINDIR=$(DESTDIR)/bin
SHAREDIR=$(DESTDIR)/share/a2pi
BIN=a2pid a2joy a2joymou a2joypad a2mon a2term fusea2pi dskread dskwrite bload brun
else
BINDIR=$(DESTDIR)/usr/bin
SHAREDIR=$(DESTDIR)/usr/share/a2pi
endif
BIN=a2joy a2joymou a2joypad a2mon a2term fusea2pi dskread dskwrite bload brun
SBIN=a2pid
A2PIDEFS=-DSETSERCLK
all: $(BIN)
all: $(BIN) $(SBIN)
a2pid: a2pid.c gpclk.c
$(CC) $(A2PIDEFS) a2pid.c -o a2pid
@ -13,13 +20,16 @@ fusea2pi: fusea2pi.c a2lib.c
$(CC) -I/usr/include/fuse -D_FILE_OFFSET_BITS=64 fusea2pi.c -lfuse -o fusea2pi
clean:
-rm $(BIN) *~ *.tar.gz
-rm $(BIN) $(SBIN) *~ *.tar.gz
install:
-mkdir -p $(BINDIR)
cp $(BIN) a2mount $(BINDIR)
-mkdir -p $(SBINDIR)
cp $(SBIN) $(SBINDIR)
-mkdir -p $(SHAREDIR)
cp ../share/* $(SHAREDIR)
uninstall:
cd $(BINDIR); rm $(BIN) a2mount
cd $(SBINDIR); rm $(SBIN)

View File

@ -20,17 +20,25 @@ fi
if [ -f /etc/rc.local ] ; then
if ! grep a2pid /etc/rc.local > /dev/null ; then
mv /etc/rc.local /etc/rc.local.bak
sed -e '/^exit/i\# Start Apple II Pi' -e '/^exit/i\/usr/local/bin/a2pid --daemon' -e '/^exit/i\wait 1' -e '/^exit/i\/usr/local/bin/a2joy' /etc/rc.local.bak > /etc/rc.local
sed -e '/^exit/i\# Start Apple II Pi' -e '/^exit/i\/usr/local/sbin/a2pid --daemon' -e '/^exit/i\wait 1' -e '/^exit/i\/usr/local/bin/a2joy' /etc/rc.local.bak > /etc/rc.local
chmod +x /etc/rc.local
fi
fi
#
# Disable joystick as a mouse in X
#
cp 11-joy.conf /usr/share/X11/xorg.conf.d
if [ -d /usr/share/X11/xorg.conf.d ] ; then
cp 11-joy.conf /usr/share/X11/xorg.conf.d
fi
#
# Make sure a2mount is executable
#
if [ -f /usr/local/bin/a2mount ] ; then
chmod +x /usr/local/bin/a2mount
fi
#
# Remove old a2pid
#
if [ -f /usr/local/bin/apid ] ; then
rm /usr/local/bin/a2pid
fi