debian/0000755000000000000000000000000012040567453007174 5ustar debian/compat0000644000000000000000000000000212040567312010364 0ustar 9 debian/control0000644000000000000000000000166312040567312010577 0ustar Source: apng2gif Section: graphics Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), libz-dev Standards-Version: 3.9.4 Homepage: https://sourceforge.net/projects/apng2gif/ Vcs-Git: git://git.debian.org/collab-maint/apng2gif.git Vcs-Browser: http://git.debian.org/?p=collab-maint/apng2gif.git;a=summary Package: apng2gif Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: tool for converting APNG images to animated GIF format This package provides a command line tool for converting images from Animated PNG to animated GIF format. . The Animated Portable Network Graphics (APNG) file format is an extension to the Portable Network Graphics (PNG) specification. It allows for animated PNG files that work similarly to animated GIF files, while retaining backward compatibility with non-animated PNG files and adding support for 8-bit transparency and 24-bit images. debian/install0000644000000000000000000000002212040567312010551 0ustar apng2gif /usr/bin debian/repack.sh0000755000000000000000000001622712040567312011002 0ustar #!/bin/sh # # Copyright # # Copyright (C) 2008-2010 Jari Aalto # # License # # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 . set -e set -u DIR="" Initialize () { # Check depends [ -x /bin/mktemp ] || Die "[ERROR]: mktemp (pkg: coreutils) not installed." [ -x /bin/bzip2 ] || Die "[ERROR]: bzip2 (pkg: bzip2) not installed." [ -x /bin/gzip ] || Die "[ERROR]: gzip (pkg: gzip) not installed." [ -x /bin/tar ] || Die "[ERROR]: tar (pkg: tar) not installed." } InitializeZip () { [ -x /usr/bin/unzip ] || Die "[ERROR]: unzip (pkg: unzip) not installed." } InitializeRar () { [ -x /usr/bin/unrar ] || Die "[ERROR]: unrar (pkg: unrar) not installed." } Help () { echo " SYNOPSIS repack.sh [--upstream-source] [PACKAGE] DESCRIPTION Repackage upstream source. The command line arguments are according to to uscan(1) order. The PACKAGE argument is optional. Can also repack *.zip and *.rar files. OPTIONS --upstream-source Option is ignored. It is passed from uscan(1) when debian/watch file is read. EXAMPLES To manually repack original upstream source foo-1.1.tar.gz to bar-1.10.orig.tar.gz: repack.sh 1.10 foo-1.1.tar.gz bar Save this file to debian/repack.sh and add following line to debian/watch: version=3 http://example.com .*package-(.+).tar.gz debian debian/repack.sh AUTHOR Copyright (C) 2008-2010 Jari Aalto Released under 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." exit 0 } Run () { if [ "${test+test_mode}" = "test_mode" ]; then echo "$@" else [ "${verbose+verbose_mode}" = "verbose_mode" ] && echo "$@" >&2 "$@" fi } Warn () { echo "$*" >&2 } Die () { Warn "$*" exit 1 } AtExit () { if [ "$DIR" ]; then [ -d "$DIR" ] && rm -rf "$DIR" fi } DebianVersion () { # No version conversions yet echo $1 } DebianTar () { local ver=$1 local dver=$2 local file=$3 local pkg=$4 # Convert suffixes file=$(echo $file | sed -e 's,\(tgz\|zip\|rar\)$,tar.gz,' ) # If version is same, use original file if [ "$ver" = "$dver" ]; then if [ "$pkg" ]; then echo $file | sed "s,.*$ver,${pkg}_$ver.orig," else echo $file fi return 0 fi if [ "$pkg" ]; then echo $file | sed -e "s,.*$ver,${pkg}_$dver.orig," else # replace with new version echo $file | sed -e "s,$ver,$dver.orig," fi } Pkg () { local file=$1 if [ -f debian/changelog ]; then dpkg-parsechangelog | awk '/^Source:/ {print $2}' else # package-1.1.tar.gz => package echo $file | sed "s,-[0-9].*,," fi } Version () { local file=$1 local pkg=$(Pkg $file) if [ ! "$pkg" ]; then Die "[ERROR] Internal error. 'pkg' variable not set. Run with debug (-x)" fi echo $file | sed -e "s,\.tar.*,," \ -e "s,\.tgz,," \ -e "s,\.tbz,," \ -e "s,\.tbz2,," \ -e "s,\.zip,," \ -e "s,\.7z,," \ -e "s,\.rar,," \ -e "s,\.lzma,," \ -e "s,\.xz,," \ -e "s,$pkg[-_],," } Cleanup () { [ "$1" ] || return 1 local dir dir=$1 find "$dir" \ \( \ -iname "*.exe" \ -o -name "*.swp" \ -o -name "DEADJOE" \ -o -name "*.[~#]" \ -o -name ".gitignore" \ -o -name ".bzrignore" \ -o -name ".svnignore" \ -o -name ".cvsignore" \ -o -path "*/debian/*" \ -o -path "*/CVS/*" \ -o -path "*/.svn/*" \ -o -path "*/.darcs/*" \ -o -path "*/.bzr/*" \ -o -path "*/.hg/*" \ -o -path "*/.git/*" \ \) \ -print0 | xargs --null --no-run-if-empty rm -rf --verbose # Remove executables find "$dir" -type f -print0 | xargs --null --no-run-if-empty file | awk -F: '$2 ~ /ELF|COFF|LSB exe/ {print $1}' | xargs --no-run-if-empty rm --verbose } Main () { if [ $# -eq 0 ]; then Help fi Initialize case "$1" in --help|-h) Help ;; --*) shift # Ignore uscan(1) argument --upstream-version in $1 ;; esac VER="$1" FILENAME="$2" DIR= if [ ! -f "$FILENAME" ]; then Die "[ERROR] Arg 2. File does not exist: $FILENAME" fi FILE_DIR=$(dirname $FILENAME) FILE=$(basename $FILENAME) PKG=${3:-$(Pkg $FILE)} if [ ! "$PKG" ]; then Die "[ERROR] Internal error. PKG not set. Run with debug (-x)" fi CURVER=$(Version $FILE) if [ ! "$CURVER" ]; then Die "[ERROR] Internal error. CURVER not set. Run with debug (-x)" fi DVER=$(DebianVersion "$VER") DFILE=$(DebianTar "$CURVER" "$DVER" "$FILE" $PKG) # Debian Developer's Reference 6.7.8.2 Repackaged upstream source REPACK_DIR="$PKG-$DVER.orig" DIR=$(mktemp -d ./tmp.repack.XXXXXX) if [ ! "$DIR" ]; then Die "[INTERNAL ERROR] mktemp(1) failed. Debug with 'sh -x PROGRAM'" fi echo "Repacking $FILENAME as $PKG-$DVER" # Create an extra directory to cope with tarballs that # do not have root/ directory UP_BASE="$DIR/unpack" Run mkdir "$UP_BASE" curdir=$(pwd) case "$FILENAME" in *.gz | *.bz2 ) Run tar -C "$UP_BASE" -xf "$FILENAME" ;; *.zip) InitializeZip adir=$(dirname $FILENAME) name=$(basename $FILENAME) Run cd "$UP_BASE" Run unzip "$curdir/$adir/$name" || return 1 cd $curdir ;; *.rar) InitializeRar adir=$(dirname $FILENAME) name=$(basename $FILENAME) Run cd "$UP_BASE" Run unrar x "$curdir/$adir/$name" || return 1 cd $curdir ;; *) Die "Unknonw file format: $FILENAME" ;; esac if [ $(ls -1 "$UP_BASE" | wc -l) -eq 1 ]; then # Tarball does contain a root directory UP_BASE="$UP_BASE/$(ls -1 "$UP_BASE")" fi if [ ! "$UP_BASE" ]; then Die "[INTERNAL ERROR] UP_BASE not set" fi Cleanup "$UP_BASE" # Repack Run mv "$UP_BASE" "$DIR/$REPACK_DIR" # Don't use pipes. Errors are not handled well with them. Run tar -C "$DIR" -cf "$DIR/repacked.tar" "$REPACK_DIR" # The .orig file must use gzip compression tar="$DIR/repacked.tar" case "$DFILE" in *.bz2) DFILE=$(echo $DFILE | sed "s/.bz2/.gz/") ;; *.gz) ;; *.zip) DFILE=$(echo $DFILE | sed "s/.zip/.gz/") ;; *.rar) DFILE=$(echo $DFILE | sed "s/.rar/.gz/") ;; *) Die "Unknown *.suffix in $DFILE" ;; esac suffix=".gz" Run gzip --best "$tar" if [ -f "$DFILE" ]; then echo "Warning, overwriting $DFILE" fi Run mv "$tar$suffix" "$DFILE" echo "Done $DFILE" } trap AtExit QUIT INT EXIT Main "$@" # End of file debian/changelog0000644000000000000000000000446312040567312011047 0ustar apng2gif (1.5-3) unstable; urgency=low * debian/control - (Standards-Version): update to 3.9.4. * debian/rules - (CFLAGS): Use -std=c99 to fix warnings. -- Jari Aalto Sat, 20 Oct 2012 21:24:46 +0300 apng2gif (1.5-2) unstable; urgency=low * debian/control - (Description): Improve first paragraph (Closes: #680247). Patch thanks to Justin B Rye . -- Jari Aalto Sat, 07 Jul 2012 09:23:35 +0300 apng2gif (1.5-1) unstable; urgency=low * New upstream release (Closes: #663412). * debian/control - (Standards-Version): update to 3.9.3.1. * debian/copyright - Update to format 1.0. * debian/debian-compile.mk - Delete; no longer used. * debian/rules - (override_dh_installman): Delete; unnecessary. See debian/manpages. - Use hardened build flags http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags -- Jari Aalto Sun, 11 Mar 2012 03:50:30 -0400 apng2gif (1.4-2) unstable; urgency=low * debian/debian-compile.mk - Use hardened CFLAGS (release goal). http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags -- Jari Aalto Sun, 05 Feb 2012 09:16:21 +0200 apng2gif (1.4-1) unstable; urgency=low * New upstrem release. -- Jari Aalto Thu, 12 Jan 2012 19:44:17 +0200 apng2gif (1.3-2) unstable; urgency=low * debian/copyright - (Format): Update URL (lintian). - (License): Use name without a slash; zlib-libpng (lintian). * debian/rules - (override_dh_auto_build): Move -lz to the end of compile line. Patch thanks to Ubuntu Angel Abad (FTBFS; Closes: #632853). - (override_dh_installman): Use dh_installman. -- Jari Aalto Sun, 18 Sep 2011 11:02:16 +0300 apng2gif (1.3-1) unstable; urgency=low * New upstream release (Closes: #641349). * debian/control - (Standards-Version): update to 3.9.2. * debian/copyright - Update layout to DEP 5. - (Licence): Add zlib/libpng. Upstream change from GPL. -- Jari Aalto Wed, 14 Sep 2011 00:15:32 +0300 apng2gif (1.1-1) unstable; urgency=low * Initial release (Closes: #606769). -- Jari Aalto Sat, 11 Dec 2010 18:28:44 +0200 debian/watch0000644000000000000000000000016412040567312010220 0ustar version=3 opts="filenamemangle=s/-src//" \ http://sf.net/apng2gif/apng2gif-(.+)-src\.zip debian debian/repack.sh debian/rules0000755000000000000000000000071112040567312010245 0ustar #!/usr/bin/make -f PACKAGE = apng2gif BIN = $(PACKAGE) CC := gcc export DEB_BUILD_MAINT_OPTIONS = hardening=+all CFLAGS += -Wall -pedantic -std=c99 LDFLAGS += -Wl,--as-needed include debian/pod2man.mk man: $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) makeman override_dh_auto_build: man $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(PACKAGE).c -o $(BIN) -lz override_dh_installchangelogs: dh_installchangelogs readme.txt %: dh $@ # End of file debian/docs0000644000000000000000000000001312040567312010033 0ustar readme.txt debian/apng2gif.1.pod0000644000000000000000000000560712040567312011536 0ustar # Copyright # # Copyright (C) 2009-2010 Jari Aalto # # License # # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 . # # Description # # To learn what TOP LEVEL sections to use in manual pages, # see POSIX/Susv standard and "Utility Description Defaults" at # http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap01.html#tag_01_11 # # This is manual page in Perl POD format. Read more at # http://perldoc.perl.org/perlpod.html or run command: # # perldoc perlpod | less # # To check the syntax: # # podchecker *.pod # # Create manual page with command: # # pod2man PAGE.N.pod > PAGE.N =pod =head1 NAME apng2gif - convert APNG animated images to GIF files =head1 SYNOPSIS apng2gif [options] =head1 DESCRIPTION Progrmam apng2gif converts APNG into animated GIF format. The Animated Portable Network Graphics (APNG) file format is an extension to the Portable Network Graphics (PNG) specification. It allows for animated PNG files that work similarly to animated GIF files, while retaining backward compatibility with non-animated PNG files and adding support for 8-bit transparency and 24-bit images. Default run values are /t 128, no background color. A short syntax hlp is provided without any command line arguments. =head1 OPTIONS =over 4 =item B Background blend color. Format: #RGB in hex, like #808080, or three values in decimal. Like: 128 128 128. If this option is used, option B is ignored With option: /b #ff0000 or /b 255 0 0 will set the background color as red, so partially transparent pixels will be composed over red. =item B Transparency threshold level between 0..155. Default is 128. pixels with alpha level less than 128 will become fully transparent. =back =head1 ENVIRONMENT None. =head1 FILES None. =head1 STANDARDS APNG homepage http://animatedpng.com =head1 SEE ALSO gifsicle(1) gifview(1) optipng(1) pngcheck(1) pngcrush pnginfo(1) pngnq(1) pngquant(1) =head1 AUTHORS Program was written by Max Stepi This manual page was written by Jari Aalto . Released under license GNU GPL version 2 or (at your option) any later version. For more information about license, visit . =cut debian/copyright0000644000000000000000000000424012040567312011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: apng2gif Upstream-Contact: Max Stepi Source: http://sourceforge.net/projects/apng2gif X-Upstream-Vcs: X-Upstream-Bugs: http://sourceforge.net/tracker/?group_id=376925&atid=1569086 Files: * Copyright: 2010-2012 Max Stepi License: zlib-libpng Files: debian/* Copyright: 2010-2012 Jari Aalto License: GPL-2+ License: zlib-libpng [From file apng2gif.c] * zlib license * ------------ * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * */ 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 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 . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/source/0000755000000000000000000000000012040567312010466 5ustar debian/source/format0000644000000000000000000000001412040567312011674 0ustar 3.0 (quilt) debian/pod2man.mk0000644000000000000000000000345312040567312011064 0ustar # pod2man.mk -- Makefile portion to convert *.pod files to manual pages # # Copyright information # # Copyright (C) 2008-2010 Jari Aalto # # License # # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 . # # Description # # Convert *.pod files to manual pages. Add this to Makefile: # # PACKAGE = package # # man: # make -f pod2man.mk PACKAGE=$(PACKAGE) makeman # # build: man ifneq (,) This makefile requires GNU Make. endif # This variable *must* be set when called PACKAGE ?= package # Optional variables to set MANSECT ?= 1 PODCENTER ?= User Commands PODDATE ?= $$(date "+%Y-%m-%d") # Directories MANSRC ?= MANDEST ?= $(MANSRC) MANPOD ?= $(MANSRC)$(PACKAGE).$(MANSECT).pod MANPAGE ?= $(MANDEST)$(PACKAGE).$(MANSECT) POD2MAN ?= pod2man POD2MAN_FLAGS ?= --utf8 makeman: $(MANPAGE) $(MANPAGE): $(MANPOD) # make target - create manual page from a *.pod page podchecker $(MANPOD) LC_ALL= LANG=C $(POD2MAN) $(POD2MAN_FLAGS) \ --center="$(PODCENTER)" \ --date="$(PODDATE)" \ --name="$(PACKAGE)" \ --section="$(MANSECT)" \ $(MANPOD) \ | sed 's,[Pp]erl v[0-9.]\+,$(PACKAGE),' \ > $(MANPAGE) && \ rm -f pod*.tmp # End of of Makefile part debian/clean0000644000000000000000000000003012040567312010164 0ustar apng2gif *.o debian/*.1 debian/manpages0000644000000000000000000000002212040567312010676 0ustar debian/apng2gif.1