-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a0c64c2
Showing
5 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Create Conan Package" | ||
on: push | ||
|
||
jobs: | ||
build_linux: | ||
name: "Linux" | ||
uses: Privatehive/conan-workflows/.github/workflows/createPackage.yml@master | ||
with: | ||
image: "ghcr.io/privatehive/conan-ubuntu:latest" | ||
conan_build_require: true | ||
conan_remotes: https://conan.privatehive.de/artifactory/api/conan/public-conan | ||
|
||
upload_recipe: | ||
name: "Finalize" | ||
uses: Privatehive/conan-workflows/.github/workflows/uploadRecipe.yml@master | ||
needs: [build_linux] | ||
if: ${{ success() }} | ||
secrets: inherit | ||
with: | ||
publish_property: ${{ github.ref == 'refs/heads/master' }} | ||
conan_upload_remote: https://conan.privatehive.de/artifactory/api/conan/public-conan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# conan-appimagetool | ||
|
||
[![Conan Remote Recipe](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2FPrivatehive%2Fconan-appimagetool%2Fproperties%2Fvalues&query=%24%5B%3F(%40.property_name%20%3D%3D%20'conan-package')%5D.value&style=flat&logo=conan&label=conan&color=%232980b9)](https://conan.privatehive.de/ui/repos/tree/General/public-conan/de.privatehive) | ||
|
||
#### Package desktop applications as AppImages that run on common Linux-based operating systems | ||
|
||
--- | ||
|
||
| os | arch | CI Status | | ||
| --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `Linux` | `x86_64` | [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Privatehive/conan-appimagetool/main.yml?branch=master&style=flat&logo=github&label=create+package)](https://github.com/Privatehive/conan-appimagetool/actions?query=branch%3Amaster) | | ||
|
||
### Usage | ||
|
||
This package contains appimagetool binary and appimage runtime you want to use in your recipe as a build dependency. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
sources: | ||
"continuous": | ||
"tool": | ||
"x86_64": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fappimagetool-x86_64.AppImage&isNativeBrowsing=false" | ||
sha1: "0738a3b3b2a9a55f5866c40839a6495801ea2d45" | ||
filename: "appimagetool-x86_64.AppImage" | ||
"x86": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fappimagetool-i686.AppImage&isNativeBrowsing=false" | ||
sha1: "9dc874f11487dea8a34b15d50002d761e38c85eb" | ||
filename: "appimagetool-x86.AppImage" | ||
"armv6": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fappimagetool-armv6.AppImage&isNativeBrowsing=false" | ||
sha1: "f493183160c8dddb9eea95a76da06148bf27595e" | ||
filename: "appimagetool-armv6.AppImage" | ||
"armv7": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fappimagetool-armhf.AppImage&isNativeBrowsing=false" | ||
sha1: "e6b24138ef3abaae8cdfa90ede3d7069c2ed454d" | ||
filename: "appimagetool-armv7.AppImage" | ||
"armv8": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fappimagetool-aarch64.AppImage&isNativeBrowsing=false" | ||
sha1: "17d08c58364207033e1874ea9c0023041d720162" | ||
filename: "appimagetool-armv8.AppImage" | ||
"runtime": | ||
"x86_64": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fruntime-x86_64&isNativeBrowsing=false" | ||
sha1: "e8294613feb5cab95e93ee224c8a55adb740630e" | ||
filename: "runtime-x86_64" | ||
"x86": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fruntime-i686&isNativeBrowsing=false" | ||
sha1: "698b4391b4237517566ca068ba4ea3a6b58499ff" | ||
filename: "runtime-i686" | ||
"armv6": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fruntime-armv6&isNativeBrowsing=false" | ||
sha1: "dbcb690ef666beccd97386e689ea6cc200351442" | ||
filename: "runtime-armv6" | ||
"armv7": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fruntime-armhf&isNativeBrowsing=false" | ||
sha1: "e22de89e6017b3ed00e44908e337daa4058fff08" | ||
filename: "runtime-armhf" | ||
"armv8": | ||
url: "https://conan.privatehive.de/ui/api/v1/download?repoKey=blob&path=appimage%252Fruntime-aarch64&isNativeBrowsing=false" | ||
sha1: "cac676a04b3c4b368ec9cee7e20ee7a1fd958599" | ||
filename: "runtime-aarch64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from conan import ConanFile | ||
from conan.tools.files import download, copy, rm | ||
from conan.errors import ConanInvalidConfiguration | ||
import json, os | ||
|
||
required_conan_version = ">=2.0" | ||
|
||
class AppImageToolConan(ConanFile): | ||
|
||
jsonInfo = json.load(open("info.json", 'r')) | ||
# ---Package reference--- | ||
name = jsonInfo["projectName"] | ||
version = jsonInfo["version"] | ||
user = jsonInfo["domain"] | ||
channel = "stable" | ||
# ---Metadata--- | ||
description = jsonInfo["projectDescription"] | ||
license = jsonInfo["license"] | ||
author = jsonInfo["vendor"] | ||
topics = jsonInfo["topics"] | ||
homepage = jsonInfo["homepage"] | ||
url = jsonInfo["repository"] | ||
# ---Requirements--- | ||
requires = [] | ||
tool_requires = [] | ||
# ---Sources--- | ||
exports = ["info.json"] | ||
exports_sources = [] | ||
# ---Binary model--- | ||
settings = "os", "arch" | ||
options = {} | ||
default_options = {} | ||
# ---Build--- | ||
generators = [] | ||
# ---Folders--- | ||
no_copy_source = True | ||
|
||
def validate(self): | ||
valid_os = ["Linux"] | ||
if str(self.settings.os) not in valid_os: | ||
raise ConanInvalidConfiguration(f"{self.name} {self.version} is only supported for the following operating systems: {valid_os}") | ||
valid_arch = ["x86_64", "x86", "armv6", "armv7", "armv8"] | ||
if str(self.settings.arch) not in valid_arch: | ||
raise ConanInvalidConfiguration(f"{self.name} {self.version} is only supported for the following architectures on {self.settings.os}: {valid_arch}") | ||
|
||
def build(self): | ||
download(self, **self.conan_data["sources"][self.version]["tool"][str(self.settings.arch)]) | ||
self.run("chmod +x ./appimagetool-%s.AppImage" % str(self.settings.arch)) | ||
self.run("./appimagetool-%s.AppImage --appimage-extract" % str(self.settings.arch)) | ||
rm(self, "appimagetool-%s.AppImage" % str(self.settings.arch), ".") | ||
valid_arch = ["x86_64", "x86", "armv6", "armv7", "armv8"] | ||
for arch in valid_arch: | ||
download(self, **self.conan_data["sources"][self.version]["runtime"][arch]) | ||
|
||
def package(self): | ||
copy(self, pattern="*", src=self.build_folder, dst=self.package_folder) | ||
|
||
def package_info(self): | ||
appimage_bin = os.path.join(self.package_folder, "squashfs-root", "usr", "bin") | ||
self.output.info('Prepending to PATH environment variable: %s' % appimage_bin) | ||
self.buildenv_info.prepend_path("PATH", appimage_bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "continuous", | ||
"projectName": "appimagetool", | ||
"projectDescription": "Package desktop applications as AppImages that run on common Linux-based operating systems", | ||
"vendor": "Björn Stresing", | ||
"contact": "bjoern.stresing@gmx.de", | ||
"domain": "de.privatehive", | ||
"copyrightYear": "2024", | ||
"repository": "https://github.com/Privatehive/conan-appimagetool", | ||
"topics": ["AppImage"], | ||
"homepage": "https://github.com/AppImage/AppImageKit", | ||
"license": "MIT" | ||
} |