Skip to content

Commit

Permalink
Added small DEB files
Browse files Browse the repository at this point in the history
  • Loading branch information
dietvin committed Jul 2, 2024
1 parent 4fbb854 commit a638bd1
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 0 deletions.
86 changes: 86 additions & 0 deletions ubuntu_compile/compile.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Compiling the pod5Viewer for Ubuntu systems

## Compile python code to executable binaries

Spec file:

```
# -*- mode: python ; coding: utf-8 -*-
Expand Down Expand Up @@ -49,7 +51,91 @@ coll = COLLECT(
name='pod5Viewer',
)
```

Use pyinstaller with spec file:

```bash
pyinstaller pod5Viewer.spec --noconfirm
```


## Set up DEB package

Folder structure for the DEB package:

```
pod5viewer_<version>
|--DEBIAN
|--control
|--postinst
|--usr
|--local
|--bin
|--_internal
|--...
|--icon.ico
|--pod5Viewer
|--share
|--applications
|--pod5Viewer.desktop
|--mime
|--packages
|--pod5viewer.xml
```
Copy the _internal folder, the icon file and the binary into the usr/local/bin folder. Contents of the other files:

- control:
```
Package: pod5viewer
Version: 1.0.1
Section: base
Priority: optional
Architecture: amd64
Maintainer: Vincent Dietrich <dietricv@uni-mainz.de>
Description: GUI for inspecting pod5 files
The pod5Viewer is a Python application that provides a graphical user interface for viewing and navigating through POD5 files.
It allows users to open multiple POD5 files, explore their contents, and display detailed data for selected read IDs.
```

- postinst
```
#!/bin/bash
set -e
# Update MIME database
update-mime-database /usr/share/mime
# Update desktop database
update-desktop-database /usr/share/applications
exit 0
```
- pod5Viewer.desktop
```
[Desktop Entry]
Version=1.0.1
Name=Pod5 Viewer
Comment=View and navigate through POD5 files
Exec=/usr/local/bin/pod5Viewer %F
Icon=/usr/local/bin/icon.ico
Terminal=false
Type=Application
Categories=Utility;Viewer;
MimeType=application/x-pod5;
```
- pod5viewer.xml
```
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-pod5">
<comment>POD5 file</comment>
<glob pattern="*.pod5"/>
</mime-type>
</mime-info>
```

Compile the package:
```bash
dpkg-deb --build pod5viewer_1.0.1
```
10 changes: 10 additions & 0 deletions ubuntu_compile/pod5viewer_1.0.1/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: pod5viewer
Version: 1.0.1
Section: base
Priority: optional
Architecture: amd64
Maintainer: Vincent Dietrich <dietricv@uni-mainz.de>
Description: GUI for inspecting pod5 files
The pod5Viewer is a Python application that provides a graphical user interface for viewing and navigating through POD5 files.
It allows users to open multiple POD5 files, explore their contents, and display detailed data for selected read IDs.

10 changes: 10 additions & 0 deletions ubuntu_compile/pod5viewer_1.0.1/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e

# Update MIME database
update-mime-database /usr/share/mime

# Update desktop database
update-desktop-database /usr/share/applications

exit 0
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0.1
Name=Pod5 Viewer
Comment=View and navigate through POD5 files
Exec=/usr/local/bin/pod5Viewer %F
Icon=/usr/local/bin/icon.ico
Terminal=false
Type=Application
Categories=Utility;Viewer;
MimeType=application/x-pod5;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-pod5">
<comment>POD5 file</comment>
<glob pattern="*.pod5"/>
</mime-type>
</mime-info>

0 comments on commit a638bd1

Please sign in to comment.