Skip to content

Commit 34164ae

Browse files
committed
create debian .deb package
1 parent ed4123a commit 34164ae

8 files changed

Lines changed: 141 additions & 0 deletions

File tree

Packaging/debian/changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pyimagefuser (0.5.0) trust; urgency=low
2+
* Rebuild
3+
-- Harry van der Wolf <hvdwolf@gmail.com> Sun, 29 May 2022 13:22:38 +0200

Packaging/debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9

Packaging/debian/control

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Section: Graphics;Viewer;Utility;2DGraphics;Photography;
2+
Priority: optional
3+
Architecture: all
4+
Maintainer: Harry van der Wolf <hvdwolf@gmail.com>
5+
Description: Python3 PySimpleGui program to exposure fuse bracketed images and reduce noise in stacks
6+
PyImageFuser is a graphical frontend python2 PySimpleGUI program for the
7+
excellent open source command line tools align_image_stack and enfuse
8+
to exposure fuse bracketed images and reduce noise in stacks
9+
Depends: python3, python3-tk, hugin-tools, enfuse
10+
Homepage: http://hvdwolf.github.io/PyImageFuser/
11+
Vcs-Git: https://github.com/hvdwolf/PyImageFuser.git
12+
Vcs-Browser: https://github.com/hvdwolf/PyImageFuser

Packaging/debian/copyright

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Upstream-Name: PyImageFuser
2+
3+
Source: http://hvdwolf.github.io/PyImageFuser/
4+
5+
Author:
6+
Harry van der Wolf <hvdwolf@gmail.com>
7+
8+
Copyright:
9+
2022 Harry van der Wolf <hvdwolf@gmail.com>
10+
11+
12+
License: GPL-3.0+
13+
14+
This package is free software; you can redistribute it and/or modify
15+
it under the terms of the GNU General Public License as published by
16+
the Free Software Foundation; either version 3 of the License, or
17+
(at your option) any later version.
18+
.
19+
This package is distributed in the hope that it will be useful,
20+
but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
GNU General Public License for more details.
23+
.
24+
You should have received a copy of the GNU General Public License
25+
along with this program. If not, see <http://www.gnu.org/licenses/>
26+
.
27+

Packaging/debian/packagedeb.sh

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#!/bin/bash
2+
3+
if [ "$1" = "" ]
4+
then
5+
printf "\n\nYou have to provide the version\n\n"
6+
exit
7+
fi
8+
9+
# Check if running as root
10+
if [ "$EUID" -ne 0 ]
11+
then printf "\n\nYou need to run this script as root with sudo\n\n"
12+
exit
13+
fi
14+
15+
printf "\n\n PYINSTALLER STUFF\n\n"
16+
DWD=$(pwd)
17+
printf "Current workdir $DWD\n"
18+
19+
printf "\n\nGo back to root folder of souce code\n"
20+
cd ../..
21+
RWD=$(pwd)
22+
printf "Current source dir $RWD\n"
23+
24+
printf "\nRemove possible previous build and dist folders and recreate binary\n\n"
25+
rm -rf dist build *.spec
26+
#cp Packaging/debian/PyImageFuser.spec .
27+
pyinstaller PyImageFuser.py
28+
29+
30+
printf "\n\nDo DEBIAN .deb STUFF\n"
31+
cd $DWD
32+
PACKAGE_NAME="pyimagefuser"
33+
APP="PyImageFuser"
34+
PACKAGE_VERSION="$1"
35+
TEMP_DIR="/tmp"
36+
37+
rm -rf $TEMP_DIR/debian
38+
39+
mkdir -p $TEMP_DIR/debian/DEBIAN
40+
mkdir -p $TEMP_DIR/debian/usr/bin
41+
mkdir -p $TEMP_DIR/debian/usr/share/applications
42+
mkdir -p $TEMP_DIR/debian/usr/share/$PACKAGE_NAME
43+
mkdir -p $TEMP_DIR/debian/usr/share/doc/$PACKAGE_NAME
44+
mkdir -p $TEMP_DIR/debian/usr/share/common-licenses/$PACKAGE_NAME
45+
46+
echo "Package: $PACKAGE_NAME" > $TEMP_DIR/debian/DEBIAN/control
47+
echo "Version: $PACKAGE_VERSION" >> $TEMP_DIR/debian/DEBIAN/control
48+
cat control >> $TEMP_DIR/debian/DEBIAN/control
49+
50+
cp pyimagefuser $TEMP_DIR/debian/usr/bin/
51+
chmod +x $TEMP_DIR/debian/usr/bin/*
52+
cp *.desktop $TEMP_DIR/debian/usr/share/applications/
53+
cp copyright $TEMP_DIR/debian/usr/share/common-licenses/$PACKAGE_NAME/ # results in no copyright warning
54+
cp copyright $TEMP_DIR/debian/usr/share/doc/$PACKAGE_NAME/
55+
56+
printf "\nCopy/configure our PyInstaller package inside the deb\n"
57+
cp -rp $RWD/dist/PyImageFuser/* $TEMP_DIR/debian/usr/share/$PACKAGE_NAME
58+
cp -rp $RWD/docs $TEMP_DIR/debian/usr/share/$PACKAGE_NAME
59+
cp -rp $RWD/images $TEMP_DIR/debian/usr/share/$PACKAGE_NAME
60+
61+
62+
echo "$PACKAGE_NAME ($PACKAGE_VERSION) trust; urgency=low" > changelog
63+
echo " * Rebuild" >> changelog
64+
echo " -- Harry van der Wolf <hvdwolf@gmail.com> `date -R`" >> changelog
65+
gzip -9c changelog > $TEMP_DIR/debian/usr/share/doc/$PACKAGE_NAME/changelog.gz
66+
67+
cp $RWD/images/logo.png $TEMP_DIR/debian/usr/share/$PACKAGE_NAME/pyimagefuser-logo.png
68+
chmod 0644 $TEMP_DIR/debian/usr/share/$PACKAGE_NAME/*.png
69+
70+
PACKAGE_SIZE=`du -bs $TEMP_DIR/debian | cut -f 1`
71+
PACKAGE_SIZE=$((PACKAGE_SIZE/1024))
72+
echo "Installed-Size: $PACKAGE_SIZE" >> $TEMP_DIR/debian/DEBIAN/control
73+
74+
chown -R root $TEMP_DIR/debian/
75+
chgrp -R root $TEMP_DIR/debian/
76+
77+
cd $TEMP_DIR/
78+
dpkg --build debian
79+
80+
mv debian.deb $DWD/$PACKAGE_NAME-$PACKAGE_VERSION.deb
81+
82+
printf "\n\nAs we run as root we now need to clean up our stuff\n"
83+
rm -rf $RWD/dist $RWD/build $RWD/*.spec
84+
rm -r $TEMP_DIR/debian
85+

Packaging/debian/pyimagefuser

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
/usr/share/pyimagefuser/PyImageFuser ${1+"$@"} &
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Name=PyImageFuser
3+
Comment=Python PysimpleGui fronted for image exposure fusion using align_image_stack and enfuse
4+
Exec=/usr/bin/pyimagefuser
5+
Icon=/usr/share/pyimagefuser/pyimagefuser-logo.png
6+
Terminal=false
7+
Type=Application
8+
Categories=Graphics;Viewer;Utility;2DGraphics;Photography;
9+
StartupNotify=true

Packaging/debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

0 commit comments

Comments
 (0)