Skip to content

Commit

Permalink
Merge pull request #8 from hartwork/2-08-debian-package
Browse files Browse the repository at this point in the history
2.08 Debian package
  • Loading branch information
mpcomplete committed Oct 15, 2015
2 parents 1ba049e + 6f919ca commit 12a4779
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 7 deletions.
2 changes: 1 addition & 1 deletion COMPILE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fireflies v2.07
# Fireflies v2.08

TO COMPILE/INSTALL:
type:
Expand Down
13 changes: 10 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
version 2.08:
* fixed compilation for recent libpng and recent GCC/G++ compiler
(Samuli Suominen, Jabari R. Roberts, Sebastian Pipping)
* fixed and improved build system (Sebastian Pipping)
* addressed compile warnings (Sebastian Pipping)
* re-made Debian packaging (Sebastian Pipping)

version 2.07:
* fix for dual-headed display bug. Thanks to an anonymous tip for finding
this.
* new FC4 spec courtesy of Simon Roberts.
* fix for dual-headed display bug. Thanks to an anonymous tip for finding
this.
* new FC4 spec courtesy of Simon Roberts.

version 2.06:
* fixed a bug with mode probalities where every part was off by 1.
Expand Down
2 changes: 1 addition & 1 deletion Make.include.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SDL_CFLAGS = @SDL_CFLAGS@
GL_LIBS = @GL_LIBS@
OPT_LIBS = @OPT_LIBS@

CPPFLAGS = -I../libgfx/include/
CPPFLAGS = -I../libgfx/include/ @CPPFLAGS@
CXXFLAGS = -Wall $(SDL_CFLAGS) @CXXFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = ../libgfx/src/libgfx.a $(GL_LIBS) $(SDL_LIBS) $(OPT_LIBS) @LIBS@
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifeq ("$(wildcard Make.include)","")
$(error Please run "autoreconf -i && ./configure", first)
endif

include Make.include

DISTFILES=\
Expand Down Expand Up @@ -35,6 +39,11 @@ clean:
$(MAKE) -C libgfx/src clean
$(MAKE) -C win32 clean

.PHONY: deb
deb:
debuild -us -uc
ls -l ../fireflies_*.deb

dist:
rm -rf fireflies-$(VERSION)
mkdir fireflies-$(VERSION)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fireflies v2.07
# Fireflies v2.08

This is an ancient project of mine that I decided to upload to github. I
haven't even compiled it in a while, but I suspect it would take a bit of work.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(fireflies, 2.07, [email protected])
AC_INIT(fireflies, 2.08, [email protected])
AC_CONFIG_SRCDIR([src/arrow.cc])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SUBDIRS([libgfx])
Expand Down
4 changes: 4 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/fireflies
/fireflies-add-xscreensaver-user
/fireflies.debhelper.log
/fireflies.substvars
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fireflies (2.08) unstable; urgency=low

* Initial Release.

-- Sebastian Pipping <[email protected]> Wed, 14 Oct 2015 00:44:50 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
19 changes: 19 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Source: fireflies
Section: x11
Priority: extra
Maintainer: Sebastian Pipping <[email protected]>
# autoconf-archive for AX_CXX_BOOL autoconf macro
Build-Depends: debhelper (>= 8.0.0),
autoconf-archive,
libx11-dev, libsdl1.2-dev, libglu1-mesa-dev, mesa-common-dev
Standards-Version: 3.9.3
Homepage: https://github.com/mpcomplete/fireflies
Vcs-Git: https://github.com/mpcomplete/fireflies
Vcs-Browser: https://github.com/mpcomplete/fireflies/tree/master/debian

Package: fireflies
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: xscreensaver
Description: Screensaver showing a flock of fireflies
Integrates with XScreensaver but works standalone, too.
58 changes: 58 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: fireflies
Source: https://github.com/mpcomplete/fireflies

Files: *
Copyright: Matt Perry <[email protected]>
License: GPL-2.0+

Files: libgfx/*
Copyright: Michael Garland <[email protected]>
License: ICU

Files: debian/*
Copyright: 2015 Sebastian Pipping <[email protected]>
License: GPL-2.0+

License: GPL-2.0+
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

License: ICU
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above
copyright notice(s) and this permission notice appear in all copies of
the Software and that both the above copyright notice(s) and this
permission notice appear in supporting documentation.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of the copyright holder.
1 change: 1 addition & 0 deletions debian/files
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fireflies_2.08_amd64.deb x11 extra
34 changes: 34 additions & 0 deletions debian/fireflies.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /bin/bash
# Copyright (C) Sebastian Pipping <[email protected]>
# Licensed under GPL v2 or later

register() {
local filename="$1"
if [[ -f "${filename}" ]]; then
if fgrep -q 'Fireflies 3D' "${filename}" ; then
echo "Fireflies 3D already registered to \"${filename}\", skipped."
else
echo "Registering Fireflies 3D to \"${filename}\"..."
cp -p "${filename}" "${filename}.before-fireflies-addition" \
&& fireflies-add-xscreensaver "${filename}"
fi
fi
}

echo "# $0 $@"

case "$1" in
configure)
for filename in \
/etc/X11/app-defaults/XScreenSaver \
/home/*/.xscreensaver \
; do
register "${filename}"
done
;;
esac

# NOTE: dh_installdeb replaces the magic marker below with shell script snippets
# generated by other debhelper commands.

#DEBHELPER#
34 changes: 34 additions & 0 deletions debian/fireflies.postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /bin/bash
# Copyright (C) Sebastian Pipping <[email protected]>
# Licensed under GPL v2 or later

unregister() {
local filename="$1"
if [[ -f "${filename}" ]]; then
if fgrep -q 'Fireflies 3D' "${filename}" ; then
echo "Unregistering Fireflies 3D from \"${filename}\"..."
cp -p "${filename}" "${filename}.before-fireflies-removal" \
&& sed '/Fireflies 3D/d' -i "${filename}"
else
echo "Fireflies 3D not registered to \"${filename}\", skipped."
fi
fi
}

echo "# $0 $@"

case "$1" in
remove)
for filename in \
/etc/X11/app-defaults/XScreenSaver \
/home/*/.xscreensaver \
; do
unregister "${filename}"
done
;;
esac

# NOTE: dh_installdeb replaces the magic marker below with shell script snippets
# generated by other debhelper commands.

#DEBHELPER#
35 changes: 35 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

_CLEAN_FILES = \
config.log \
config.status \
libgfx/config.log \
libgfx/config.status

%:
dh $@

override_dh_auto_configure:
CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_configure

debian/fireflies-add-xscreensaver-user:
printf '#! /bin/sh\nfireflies-add-xscreensaver ~/.xscreensaver\n' > $@

override_dh_auto_install: debian/fireflies-add-xscreensaver-user
dh_auto_install
install -D -m 0755 add-xscreensaver debian/fireflies/usr/bin/fireflies-add-xscreensaver
install -D -m 0755 debian/fireflies-add-xscreensaver-user debian/fireflies/usr/bin/fireflies-add-xscreensaver-user

override_dh_clean:
dh_clean
$(RM) $(_CLEAN_FILES)
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)

0 comments on commit 12a4779

Please sign in to comment.