Support other media types besides apps
Currently, repomaker only supports apps via APK files. In the future, it should also support other types of media such as videos, audios, books, etc.
Other media types are includes in the top-level JSON array apps
(even if they are not apps) like so:
{
"apps": [
{
"added": 1491606000000,
"categories": [
"System"
],
"description": "<p><b>Note:</b> F-Droid will need root privileges to install this app as a system app.</p>",
"lastUpdated": 1493247600000,
"name": "org.fdroid.fdroid.privileged.ota_2040.zip",
"packageName": "org.fdroid.fdroid.privileged.ota",
"suggestedVersionCode": "2040",
"suggestedVersionName": "0.2.4",
"summary": "Help F-Droid acquire system privileges",
"webSite": "https://f-droid.org"
},
],
}
So it essentially supports all fields that apps also support, even suggestedVersionCode
and suggestedVersionName
.
The packageName
can be freely chosen as long as it doesn't conflict with other apps in the index. It can be the sha265 hash of a file, the file name or something supplied by the user. Important is that the packageName
is a key in the packages
JSON object with at least one entry which looks like this:
{
"packages": {
"org.fdroid.fdroid.privileged.ota": [
{
"added": 1493247600000,
"apkName": "org.fdroid.fdroid.privileged.ota_2040.zip",
"hash": "6929cd908aaf72c0fe41887001bd9c636b5c6aba4b6899a2f0d29b0b46e6077e",
"hashType": "sha256",
"packageName": "org.fdroid.fdroid.privileged.ota",
"size": 3679840,
"versionCode": 2040,
"versionName": "6929cd908aaf72c0fe41887001bd9c636b5c6aba4b6899a2f0d29b0b46e6077e"
},
{
"added": 1492038000000,
"apkName": "org.fdroid.fdroid.privileged.ota_2030.zip",
"hash": "cafea902e34ec161e01ca6ec7c9b259180745fc210aa0b488eb1b3b62c6e61ec",
"hashType": "sha256",
"packageName": "org.fdroid.fdroid.privileged.ota",
"size": 3677402,
"versionCode": 2030,
"versionName": "cafea902e34ec161e01ca6ec7c9b259180745fc210aa0b488eb1b3b62c6e61ec"
}
],
},
}
- The
packageName
needs to match the parent key and be the same for packages of that "app". - The
versionCode
needs to be an integer and could automatically be set to the same value ofadded
to ensure increasing values. - The
versionName
is a string and can be set by the user. It might default to the string representation ofadded
as well. - The
apkName
is exactly the filename of the package in the repository (even if the package is not actually an APK).