Skip to content

Commit

Permalink
Initial Debian packaging and automatic package building (#17)
Browse files Browse the repository at this point in the history
* Add packaging files

* Attempt to build the Debian package

* Build Debian package

* Fix package installation

* Install build-deps

* Don't use zstd

* Re-add original parts of the workflow

* Install upstream changelog

* Update copyright file

[build] [tests]
  • Loading branch information
dleidert authored Dec 1, 2022
1 parent c7475d8 commit 3973f16
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
git clone https://github.com/visioninit/aimm
cd aimm
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:' * %s' | sed '/Merge/d' > changelog.txt
mv changelog.txt ..
cp changelog.txt ..
cd ..
- name: Build Linux
run: |
Expand All @@ -43,11 +43,24 @@ jobs:
dist/aimm list
dist/aimm remove BSRGAN
dist/aimm search GFPGAN
- name: set package version
run: |
echo "DEBIAN_PACKAGE_VERSION=$(dist/aimm --version | awk -F: '{print $2}' | tr -d ' ')+$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
- name: Build Debian package
run: |
sudo apt-get update -y
sudo apt-get install -y dpkg-dev devscripts
sudo apt-get build-dep -y --no-install-recommends .
dch --newversion $DEBIAN_PACKAGE_VERSION -D unstable -m 'Build Debian package.'
debuild -b -us -uc
mv ../*.deb .
# - name: Upload Release Linux
# uses: actions/upload-artifact@v3
# with:
# name: Linux Binary
# path: dist/aimm
# path: |
# dist/aimm
# *.deb
- name: 📂 Deploy FTP
uses: SamKirkland/[email protected]
with:
Expand Down Expand Up @@ -176,4 +189,4 @@ jobs:
# uses: actions/upload-artifact@v3
# with:
# name: MacOS Binary
# path: ./aimm
# path: ./aimm
4 changes: 4 additions & 0 deletions debian/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.gitattributes export-ignore
.gitignore export-ignore
gbp.conf export-ignore
salsa-ci.yml export-ignore
6 changes: 6 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.substvars
.debhelper.log
aimm/
debhelper-build-stamp
files
tmp/
6 changes: 6 additions & 0 deletions debian/aimm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
# vim: set ts=4 sw=4 ai si et:

exec /usr/libexec/aimm/aimm $@

exit 0
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
aimm (0~0) unstable; urgency=medium

* Initial release.

-- Daniel Leidert <[email protected]> Thu, 01 Dec 2022 00:51:37 +0100
28 changes: 28 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Source: aimm
Section: science
Priority: optional
Maintainer: Daniel Leidert <[email protected]>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.6.0
Homepage: https://aimodels.org/
Vcs-Browser: https://github.com/visioninit/aimm
Vcs-Git: https://github.com/visioninit/aimm.git
Rules-Requires-Root: binary-targets

Package: aimm
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends},
${shlibs:Depends}
Description: AI Model Manager
AI Model Manager CLI, it's like pip or npm - but for AI models!
.
For users, this allows easily managing your collection of AI models. It stores
your models in a location that all of your AI enabled apps can access, so you
don't need to worry about the huge files taking up so much space, or creating
symlinks. Finally, no more having to hunt for a model and making sure you
rename it and put it in the correct folder correctly.
.
For developers, it means less code that you have to handle initializing your
app and collecting all of the AI model resources needed. AI Model Manager also
will provide security through checksum checks and pickle scanning.
30 changes: 30 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: AI Model Manager
Upstream-Contact: https://aimodels.org/
Source: https://github.com/visioninit/aimm
Comment: The binary file is created via pyinstaller and ships copies of
multiple PyPi modules, released under various OSS licenses. Please refer
to the output of `aimm --license` for a full list of licenses.

Files: *
Copyright: 2022, Justin Riddiough (VisionInit)
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comment: The full text of the Apache 2.0 license can be found in the
file '/usr/share/common-licenses/Apache-2.0'.

Files: icons/*
Copyright: 2022, Justin Riddiough (VisionInit)
License: other
Logos and images are not licensed under Apache 2.0 License. Please ask
the copyright holder for more information.
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/aimm usr/bin/
11 changes: 11 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/make -f
# export DH_VERBOSE=1

%:
dh $@ --buildsystem=none

override_dh_builddeb:
dh_builddeb -- -Zgzip

override_dh_installchangelogs:
dh_installchangelogs changelog.txt
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)
1 change: 1 addition & 0 deletions debian/source/local-options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tar-ignore = ".git"
7 changes: 7 additions & 0 deletions debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Archive: GitHub
Bug-Database: https://github.com/visioninit/aimm/issues
Bug-Submit: https://github.com/visioninit/aimm/issues/new
Changelog: https://github.com/visioninit/aimm/commits/
Repository: https://github.com/visioninit/aimm.git
Repository-Browse: https://github.com/visioninit/aimm

0 comments on commit 3973f16

Please sign in to comment.