├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── documentation-issue.md │ ├── documentation-request.md │ ├── installation-issue.md │ ├── package-issue.md │ └── package-request.md ├── actions │ ├── discord-send │ │ └── action.yml │ ├── setup │ │ └── action.yml │ └── sync-repository │ │ └── action.yml ├── pull_request_template.md └── workflows │ ├── pr-labels.yml │ ├── pr.yml │ ├── stable.yml │ └── testing.yml ├── .gitignore ├── .mypy.ini ├── .pylintrc ├── LICENSE ├── Makefile ├── README.md ├── docs ├── branches.md ├── building.md ├── code_of_conduct.md ├── contributing.md ├── opkg.md ├── package-guide.md ├── package.md └── security.md ├── package ├── .shellcheckrc ├── 7zip │ └── package ├── Compatibility ├── appmarkable │ └── package ├── bandwhich │ └── package ├── bash-completion │ └── package ├── calculator │ ├── calculator.draft │ ├── calculator.svg │ └── package ├── changescrn │ └── package ├── chessmarkable │ └── package ├── ddvk-hacks │ └── package ├── debian-chroot │ ├── debian-chroot.conf │ └── package ├── display │ ├── package │ ├── rm2fb-client │ ├── rm2fb-preload.conf │ ├── rm2fb-preload.env │ └── rm2fb.service ├── doomarkable │ └── package ├── dotnet │ ├── dotnet-profile.sh │ └── package ├── draft │ ├── draft.service │ ├── launcherctl-draft │ └── package ├── entware-rc │ ├── entware-rc@.service │ ├── package │ └── rcctl ├── evtest │ └── package ├── fbink │ └── package ├── fingerterm │ ├── fingerterm.draft │ ├── fingerterm.png │ └── package ├── folly │ ├── folly.draft │ └── package ├── fuse │ ├── fix-multiple-yylloc-definitions.patch │ └── package ├── gocryptfs │ └── package ├── innernet │ └── package ├── kernelctl │ ├── kernelctl │ └── package ├── keyd │ ├── default.conf │ └── package ├── keywriter │ ├── keywriter.draft │ └── package ├── koreader │ ├── KOReader.oxide │ ├── koreader │ ├── koreader-toltec.service │ ├── koreader.draft │ ├── launcherctl-koreader │ └── package ├── launcherctl │ ├── launcherctl │ └── package ├── lf │ └── package ├── libdlib │ └── package ├── libvncserver │ └── package ├── linux-mainline │ ├── package │ └── remarkable_defconfig ├── linux-stracciatella │ └── package ├── micro │ └── package ├── mmc-utils │ ├── 0001-Makefile-Remove-Werror.patch │ └── package ├── move-logs-to-opt │ ├── package │ └── var-log.mount ├── neofetch │ └── package ├── netevent │ └── package ├── netsurf │ ├── netsurf.draft │ └── package ├── open-remarkable-shutdown │ ├── package │ ├── remarkable-reboot-override.conf │ └── remarkable-shutdown-override.conf ├── oxide │ ├── launcherctl-oxide │ ├── package │ └── toltec-rm2-override.conf ├── plato │ └── package ├── puzzles │ ├── package │ ├── puzzles.draft │ └── toltec.patch ├── quickjs │ └── package ├── reboot-guard │ ├── package │ ├── rguard.patch │ └── rguard.service ├── recrossable │ ├── package │ ├── recrossable.draft │ └── recrossable.svg ├── regenda │ └── package ├── remarkable-splash │ └── package ├── remarkable-stylus │ ├── package │ └── remarkable-stylus.env ├── remarkable_templates │ └── package ├── restream │ └── package ├── reterm │ └── package ├── retris │ └── package ├── rm2-suspend-fix │ ├── package │ └── rm2-suspend-fix.sh ├── rmfakecloud-proxy │ ├── package │ ├── rmfakecloud-proxy.service │ └── rmfakecloudctl ├── rmfm │ ├── package │ └── path_fix.patch ├── rmkit │ ├── changelog │ ├── genie.service │ ├── launcherctl-remux │ ├── package │ └── remux.service ├── rmservewacominput │ ├── package │ ├── rmservewacominput-gui │ └── rmservewacominput.draft ├── signature-rm │ └── package ├── sill │ ├── package │ └── sill.draft ├── splashcreens-wavy-lines │ └── package ├── splashscreens-1094 │ └── package ├── splashscreens │ └── package ├── sudoku │ └── package ├── sysfs_preload │ └── package ├── tailscale-systemd │ ├── package │ └── tailscaled.service ├── template-cartesian-graph │ └── package ├── template-noso-grid │ └── package ├── templatectl │ └── package ├── tilem │ └── package ├── toltec-base │ ├── opt-usr-bin.sh │ └── package ├── toltec-bootstrap │ ├── 15-systemd-input.rules │ ├── package │ └── toltecctl ├── toltec-completion │ ├── _launcherctl │ ├── _opkg │ ├── _rcctl │ ├── _toltecctl │ └── package ├── toltec-deletions │ └── package ├── vnsee │ ├── VNSee.oxide │ ├── package │ ├── vnsee-gui-set-path.patch │ ├── vnsee.draft │ └── vnsee.png ├── webinterface-localhost │ ├── package │ ├── webinterface-localhost.service │ └── webinterface-localhost.socket ├── webinterface-onboot │ ├── package │ └── webinterface-onboot-toltec.service ├── webinterface-upload-button │ └── package ├── webinterface-wifi │ ├── package │ └── webinterface-wifi-toltec.service ├── whiteboard-hypercard │ ├── package │ └── whiteboard-hypercard.draft ├── wikipedia │ ├── package │ ├── wikipedia.draft │ └── wikipedia.png ├── wireguard │ ├── fix-multiple-yylloc-definitions.patch │ └── package ├── xochitl │ ├── env-readme │ ├── kill-xochitl │ ├── launcherctl-xochitl │ ├── manual-sync@.service │ ├── package │ ├── toltec-after-launcher.conf │ ├── toltec-wrapper.conf │ ├── xochitl │ ├── xochitl.draft │ ├── xochitl.oxide │ └── xochitl.png ├── yaft │ └── package ├── zerotier-one │ └── package ├── zoneinfo-utils │ └── package └── zshelf │ ├── package │ ├── zshelf.draft │ └── zshelf.png ├── requirements.txt └── scripts ├── bootstrap └── bootstrap ├── build ├── __init__.py ├── graphlib.py ├── paths.py ├── repo.py └── util.py ├── package-lib ├── package_build.py ├── repo-check ├── repo_build.py └── templates └── listing.html /.editorconfig: -------------------------------------------------------------------------------- 1 | # Style guide for Toltec 2 | # See 3 | root = true 4 | 5 | [*] 6 | # Options that apply to all source files 7 | indent_style = space 8 | indent_size = 4 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | max_line_length = 80 14 | 15 | # Options for shell scripts 16 | shell_variant = bash 17 | binary_next_line = true 18 | switch_case_indent = true 19 | space_redirects = true 20 | keep_padding = false 21 | function_next_line = false 22 | 23 | [build/**] 24 | ignore = true 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation Issue 3 | about: Report an issue with the documentation 4 | title: '' 5 | labels: bug, documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the issue** 11 | A clear and concise description of what the issue with the documentation is. 12 | 13 | **Potential resolution** 14 | A clear and concise description of what you expected to happen. 15 | 16 | **Links** 17 | If applicable, add links to the documentation in question. 18 | 19 | **Additional context** 20 | Add any other context about the problem here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation request 3 | about: Request changes to the documentation 4 | title: '' 5 | labels: documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your documentation request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/installation-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Installation issue 3 | about: Report an issue with the installation process 4 | title: '' 5 | labels: bug, install 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the issue** 11 | A clear and concise description of what the issue is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behaviour: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behaviour** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **System information:** 27 | `toltecctl status` output: 28 | ``` 29 | EXAMPLE: 30 | reMarkable: ~/ toltecctl status 31 | Enabled: Yes 32 | Supported: Yes 33 | Branch: testing 34 | Model: rm2 35 | OS: 3.3.2.166 36 | ``` 37 | 38 | **Additional context** 39 | Add any other context about the problem here. 40 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/package-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Package Issue 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug, packages 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the issue** 11 | A clear and concise description of what the issue is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behaviour: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behaviour** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Upstream issue** 24 | If applicable, add the link to the upstream issue here. 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **System information:** 30 | - `toltecctl status` output: 31 | ``` 32 | EXAMPLE: 33 | reMarkable: ~/ toltecctl status 34 | Enabled: Yes 35 | Supported: Yes 36 | Branch: testing 37 | Model: rm2 38 | OS: 3.3.2.166 39 | ``` 40 | - Package: [e.g. toltec-base 0.0.1-1] 41 | 42 | **Additional context** 43 | Add any other context about the problem here. 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/package-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Package request 3 | about: Request a package be added to toltec 4 | title: Add [package] to toltec 5 | labels: packages 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Package information** 11 | Add the name of the package, and a link to where the source can be found. 12 | 13 | **Reason for addition** 14 | Provide some basic information about why you'd need this package, and what it provides that existing packages don't. 15 | -------------------------------------------------------------------------------- /.github/actions/discord-send/action.yml: -------------------------------------------------------------------------------- 1 | name: Send a Discord message 2 | description: Send a message to a Discord channel 3 | inputs: 4 | channel: 5 | description: Identifier of the channel to send the message to 6 | required: true 7 | token: 8 | description: API access token 9 | required: true 10 | title: 11 | description: Title of the message to send 12 | required: true 13 | link: 14 | description: URL to link the message title to 15 | required: true 16 | color: 17 | description: Color to annotate the message with 18 | required: true 19 | message: 20 | description: Content of the message to send 21 | required: true 22 | runs: 23 | using: composite 24 | steps: 25 | - name: Post to the Discord REST API 26 | shell: bash 27 | env: 28 | MSG_TITLE: ${{ inputs.title }} 29 | MSG_LINK: ${{ inputs.link }} 30 | MSG_COLOR: ${{ inputs.color }} 31 | MSG_VALUE: ${{ inputs.message }} 32 | run: | 33 | payload="$(jq --null-input --compact-output --monochrome-output \ 34 | --arg title "$MSG_TITLE" \ 35 | --arg link "$MSG_LINK" \ 36 | --arg color "$MSG_COLOR" \ 37 | --arg message "$MSG_VALUE" \ 38 | '{ 39 | username: "Toltec", 40 | avatar_url: "https://avatars0.githubusercontent.com/u/71158884", 41 | embeds: [{ 42 | title: $title, 43 | url: $link, 44 | color: $color, 45 | description: $message, 46 | }] 47 | }')" 48 | curl --silent --show-error --fail \ 49 | --header "Content-Type: application/json" \ 50 | --data "$payload" \ 51 | 'https://discord.com/api/webhooks/${{ inputs.channel }}/${{ inputs.token }}' 52 | -------------------------------------------------------------------------------- /.github/actions/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup Toltec dependencies 2 | runs: 3 | using: "composite" 4 | steps: 5 | - name: Check for Apt updates 6 | shell: bash 7 | run: | 8 | sudo apt-get update -yq 9 | echo "aptVersion=libarchive-tools-$(apt-cache policy libarchive-tools | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV 10 | - name: Cache Apt packages 11 | uses: actions/cache@v4 12 | id: cache-apt 13 | with: 14 | path: ~/.aptcache 15 | key: ${{ env.aptVersion }} 16 | - name: Install or restore Apt packages 17 | shell: bash 18 | env: 19 | CACHE_HIT: ${{ steps.cache-apt.outputs.cache-hit }} 20 | run: | 21 | if [[ "$CACHE_HIT" != 'true' ]]; then 22 | sudo apt-get install -yq libarchive-tools 23 | mkdir -p ~/.aptcache 24 | sudo dpkg -L libarchive-tools | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/.aptcache/ 25 | else 26 | sudo cp --verbose --force --recursive ~/.aptcache/* / 27 | fi 28 | - name: Cache shfmt 29 | uses: actions/cache@v4 30 | with: 31 | path: /usr/local/bin/shfmt 32 | key: 43439b996942b53dfafa9b6ff084f394555d049c98fb7ec37978f7668b43e1be 33 | - name: Install shfmt 34 | shell: bash 35 | run: | 36 | install_dir=/usr/local/bin 37 | if ! [[ -f "$install_dir"/shfmt ]]; then 38 | shfmt_version=v3.2.1 39 | shfmt_checksum=43439b996942b53dfafa9b6ff084f394555d049c98fb7ec37978f7668b43e1be 40 | sudo curl --location --silent --fail --tlsv1.2 --proto '=https' \ 41 | --output "$install_dir"/shfmt \ 42 | https://github.com/mvdan/sh/releases/download/"$shfmt_version"/shfmt_"$shfmt_version"_linux_amd64 43 | sha256sum -c <(echo "$shfmt_checksum $install_dir/shfmt") > /dev/null 2>&1 44 | sudo chmod a+x "$install_dir"/shfmt 45 | fi 46 | - name: Cache Shellcheck 47 | uses: actions/cache@v4 48 | with: 49 | path: /usr/local/bin/shellcheck 50 | key: 64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8 51 | - name: Install Shellcheck 52 | shell: bash 53 | run: | 54 | install_dir=/usr/local/bin 55 | if ! [[ -f "$install_dir"/shellcheck ]];then 56 | shellcheck_version=v0.7.1 57 | shellcheck_checksum=64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8 58 | shellcheck_arname=shellcheck.tar.xz 59 | curl --location --silent --fail --tlsv1.2 --proto '=https' \ 60 | --output "$shellcheck_arname" \ 61 | https://github.com/koalaman/shellcheck/releases/download/"$shellcheck_version"/shellcheck-"$shellcheck_version".linux.x86_64.tar.xz 62 | sha256sum -c <(echo "$shellcheck_checksum $shellcheck_arname") > /dev/null 2>&1 63 | tar -xf "$shellcheck_arname" --strip-components=1 \ 64 | shellcheck-"$shellcheck_version"/shellcheck 65 | rm "$shellcheck_arname" 66 | chmod a+x shellcheck 67 | sudo chown root:root shellcheck 68 | sudo mv shellcheck "$install_dir" 69 | fi 70 | - name: Setup Python 71 | uses: actions/setup-python@v5 72 | with: 73 | python-version: '3.12' 74 | - name: Cache Python environment 75 | uses: actions/cache@v4 76 | id: cache-python 77 | with: 78 | path: .venv 79 | key: .venv-${{ hashFiles('requirements.txt') }} 80 | - name: Install Python dependencies 81 | shell: bash 82 | env: 83 | CACHE_HIT: ${{ steps.cache-python.outputs.cache-hit }} 84 | run: | 85 | if [[ "$CACHE_HIT" != 'true' ]]; then 86 | make .venv/bin/activate 87 | fi 88 | -------------------------------------------------------------------------------- /.github/actions/sync-repository/action.yml: -------------------------------------------------------------------------------- 1 | name: Sync with remote repository 2 | description: Synchronize packages with a remote repository 3 | inputs: 4 | local-path: 5 | description: Path to the directory containing the packages to push 6 | required: true 7 | ssh-key: 8 | description: Private SSH key to access the remote repository 9 | required: true 10 | ssh-known-hosts: 11 | description: Public SSH key of the remote repository 12 | required: true 13 | ssh-port: 14 | description: SSH port to use to reach the remote repository 15 | required: false 16 | default: 22 17 | remote-path: 18 | description: Path to the remote directory to place the packages in 19 | required: true 20 | runs: 21 | using: composite 22 | steps: 23 | - name: rsync packages and index 24 | shell: bash 25 | run: | 26 | mkdir -p private 27 | chmod 700 private 28 | echo '${{ inputs.ssh-key }}' > private/id_rsa 29 | echo '${{ inputs.ssh-known-hosts }}' > private/known_hosts 30 | chmod 600 private/* 31 | rsync --archive --verbose --compress --delete --hard-links \ 32 | -e "ssh -p ${{ inputs.ssh-port }} -i private/id_rsa -o UserKnownHostsFile=private/known_hosts" \ 33 | '${{ inputs.local-path }}' \ 34 | '${{ inputs.remote-path }}' 35 | rm -r private 36 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /.github/workflows/pr-labels.yml: -------------------------------------------------------------------------------- 1 | name: pr-labels 2 | on: 3 | pull_request: 4 | types: [opened, reopened, synchronize, edited, labeled, unlabeled] 5 | jobs: 6 | check-labels: 7 | name: Check that PRs against the stable branch are labelled correctly 8 | runs-on: ubuntu-22.04 9 | steps: 10 | - name: Check labels 11 | run: | 12 | [[ '${{ github.base_ref }}' != stable ]] \ 13 | || [[ '${{ contains(github.event.pull_request.labels.*.name, 'merge') }}' == true ]] 14 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: pr 2 | on: 3 | pull_request 4 | jobs: 5 | lint: 6 | name: Check that it conforms to the style guide 7 | runs-on: ubuntu-22.04 8 | steps: 9 | - name: Checkout the Git repository 10 | uses: actions/checkout@v4 11 | - name: Setup Toltec dependencies 12 | uses: ./.github/actions/setup 13 | - name: Check formatting 14 | run: make format 15 | - name: Check for erroneous constructs 16 | run: make lint 17 | pr: 18 | name: Check that it builds without error 19 | runs-on: ubuntu-22.04 20 | needs: lint 21 | steps: 22 | - name: Checkout the Git repository 23 | uses: actions/checkout@v4 24 | - name: Setup Toltec dependencies 25 | uses: ./.github/actions/setup 26 | - name: Build packages 27 | run: FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' make repo-new 28 | - name: Save the build output 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: repo 32 | path: build/repo 33 | - name: Build packages for experimental 34 | if: ${{ contains(github.event.pull_request.labels.*.name, 'experimental') }} 35 | run: make repo FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' 36 | - name: Sync packages with the remote repository 37 | if: ${{ contains(github.event.pull_request.labels.*.name, 'experimental') }} 38 | uses: ./.github/actions/sync-repository 39 | with: 40 | local-path: build/repo/ 41 | ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} 42 | ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} 43 | ssh-port: ${{ secrets.SSH_PORT }} 44 | remote-path: ${{ secrets.REMOTE_SSH }}:/srv/toltec/experimental 45 | -------------------------------------------------------------------------------- /.github/workflows/stable.yml: -------------------------------------------------------------------------------- 1 | name: stable 2 | on: 3 | push: 4 | branches: 5 | - stable 6 | jobs: 7 | stable: 8 | name: Build and publish the stable channel 9 | runs-on: ubuntu-22.04 10 | steps: 11 | - name: Checkout the Git repository 12 | uses: actions/checkout@v4 13 | - name: Setup Toltec dependencies 14 | uses: ./.github/actions/setup 15 | - name: Build packages 16 | run: | 17 | make repo FLAGS='--remote-repo ${{ secrets.REMOTE_HTTP }}/stable' 18 | - name: Sync packages with the remote repository 19 | uses: ./.github/actions/sync-repository 20 | with: 21 | local-path: build/repo/ 22 | ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} 23 | ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} 24 | ssh-port: ${{ secrets.SSH_PORT }} 25 | remote-path: ${{ secrets.REMOTE_SSH }}:/srv/toltec/stable 26 | - name: Trigger website rebuild 27 | run: gh api repos/toltec-dev/web/dispatches -f event_type='update-bootstrap-from-stable' 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} 30 | - name: Create Github Release 31 | continue-on-error: true 32 | run: | 33 | sudo apt-get update && sudo apt-get install -y hub 34 | hub release create -t $SHA -m $MESSAGE $(date +%G-W%V-%u) 35 | env: 36 | SHA: ${{ github.sha }} 37 | GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} 38 | MESSAGE: ${{ github.event.commits[0].message }} 39 | - name: Send notification to Discord 40 | continue-on-error: true 41 | uses: ./.github/actions/discord-send 42 | with: 43 | channel: ${{ secrets.DISCORD_STABLE_CHANNEL_ID }} 44 | token: ${{ secrets.DISCORD_STABLE_CHANNEL_TOKEN }} 45 | title: New Toltec stable update available 46 | link: https://toltec-dev.org/stable 47 | color: 0x2ea043 48 | message: ${{ github.event.commits[0].message }} 49 | -------------------------------------------------------------------------------- /.github/workflows/testing.yml: -------------------------------------------------------------------------------- 1 | name: testing 2 | on: 3 | push: 4 | branches: 5 | - testing 6 | jobs: 7 | testing: 8 | name: Build and publish the testing channel 9 | runs-on: ubuntu-22.04 10 | steps: 11 | - name: Checkout the Git repository 12 | uses: actions/checkout@v4 13 | - name: Setup Toltec dependencies 14 | uses: ./.github/actions/setup 15 | - name: Build packages 16 | run: | 17 | make repo FLAGS='--remote-repo ${{ secrets.REMOTE_HTTP }}/testing' 18 | - name: Sync packages with the remote repository 19 | uses: ./.github/actions/sync-repository 20 | with: 21 | local-path: build/repo/ 22 | ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} 23 | ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} 24 | ssh-port: ${{ secrets.SSH_PORT }} 25 | remote-path: ${{ secrets.REMOTE_SSH }}:/srv/toltec/testing 26 | - name: Send notification to Discord 27 | continue-on-error: true 28 | uses: ./.github/actions/discord-send 29 | with: 30 | channel: ${{ secrets.DISCORD_TESTING_CHANNEL_ID }} 31 | token: ${{ secrets.DISCORD_TESTING_CHANNEL_TOKEN }} 32 | title: New Toltec testing update available 33 | link: https://toltec-dev.org/testing 34 | color: 0xe3b341 35 | message: ${{ github.event.commits[0].message }} 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | private 2 | build/ 3 | !scripts/build/ 4 | __pycache__ 5 | .venv/ 6 | repo/ 7 | -------------------------------------------------------------------------------- /.mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy] 2 | [mypy-elftools.*] 3 | ignore_missing_imports = True 4 | [mypy-docker.*] 5 | ignore_missing_imports = True 6 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | [SIMILARITIES] 2 | # Do not consider duplicate imports in several files as duplicated code 3 | ignore-imports=yes 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 The Toltec Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Toltec 2 | 3 | ![Status of the stable repository](https://github.com/toltec-dev/toltec/workflows/stable/badge.svg) 4 | ![Status of the testing repository](https://github.com/toltec-dev/toltec/workflows/testing/badge.svg) 5 | [![rM1: supported](https://img.shields.io/badge/rM1-supported-green)](https://remarkable.com/store/remarkable) 6 | [![rM2: supported](https://img.shields.io/badge/rM2-supported-green)](https://remarkable.com/store/remarkable-2) 7 | [![Discord](https://img.shields.io/discord/385916768696139794.svg?label=reMarkable&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/ATqQGfu) 8 | 9 | Toltec is a community-maintained repository of free software for the [reMarkable tablet](https://remarkable.com/). 10 | 11 | ### Installation and Use 12 | 13 | Please refer to [the Toltec website](https://toltec-dev.org/) for up-to-date information on how to install and use Toltec. 14 | 15 | ### Building 16 | 17 | This Git repository contains all the tools and recipes required to build the packages published on the package repository. 18 | This repository is automatically built and published every time that a commit is pushed to Git, using [Github Actions](https://docs.github.com/en/actions). 19 | Since all the packaged software in Toltec is free, you can also **build them from source yourself** instead of using the pre-built binaries. 20 | The build process is fully [reproducible](https://reproducible-builds.org/), which means that you can verify that the published packages have not been tampered with during the automated build process. 21 | 22 | [Learn how to build the repository from source →](docs/building.md) 23 | 24 | ### Contributing 25 | 26 | Your contribution is welcome for adding new packages, updating existing ones or improving the build tooling. 27 | 28 | [Learn how to contribute to Toltec →](docs/contributing.md) 29 | -------------------------------------------------------------------------------- /docs/branches.md: -------------------------------------------------------------------------------- 1 | ## Release Branches 2 | 3 | There are two release branches in Toltec, [stable](https://toltec-dev.org/stable) and [testing](https://toltec-dev.org/testing). 4 | As a user, **you always want to use the stable branch**, which is the default one when following the install instructions. 5 | The testing branch exists solely for the repository maintainers to make sure that packages work correctly before distributing them to users. 6 | It may contain packages that could cause breakage if you install them on your device. 7 | 8 | Use the `toltecctl switch-branch [stable|testing]` command to switch between the stable and testing branches. 9 | After switching from stable to testing, you should run `opkg upgrade` to upgrade your installed packages to their version in testing. 10 | After switching from testing to stable, you may need to manually downgrade the packages that were newer in testing. 11 | 12 | ### Adding or Updating a Package 13 | 14 | New packages or package updates are exclusively proposed through pull requests based on the testing branch. 15 | A proposal can be merged into testing after it is reviewed by a maintainer and if it builds successfully in the CI. 16 | If it is a proposal for a new package, the maintainer who reviews the pull request becomes the maintainer for that package. 17 | If it updates an existing package, the maintainer of that specific package should do the review. 18 | 19 | ### Moving a Package from Testing to Stable 20 | 21 | Each Saturday, a pull request can be opened with selected updates from the testing branch to merge in the stable branch. 22 | Only bug fixes may be added to existing merge PRs over the weekend. 23 | This pull request can only be merged from the following Monday. 24 | Each of these package changes must be tested by a maintainer different from the maintainer of the affected package. 25 | 26 | Here are important things to check when testing a package: 27 | 28 | 1. The package should work as intended by upstream. 29 | 2. It should not have any known major bugs. 30 | 3. It must not destroy any user data (e.g. from previous versions of the same package, from other packages, from the home directory). 31 | 4. It must not break other packages. 32 | 5. It must not lock the device in a state where it cannot be used without rebooting or troubleshooting through SSH. 33 | 34 | ### Orphaning a Package 35 | 36 | The maintainer of a package can, for any reason, choose to orphan a package. 37 | To do so, they need to send a pull request to reset the [`maintainer` metadata field](docs/package.md#maintainer-required) of that package to `None `. 38 | The next person to review a pull request regarding an orphaned package becomes its new maintainer and must update the `maintainer` field accordingly. 39 | -------------------------------------------------------------------------------- /docs/building.md: -------------------------------------------------------------------------------- 1 | ## Building the Repository from Source 2 | 3 | The Toltec repository is automatically built for each commit on the `stable` and `testing` branches. 4 | You may want to build the repository locally when working with a new package recipe or to make sure that nobody tampered with the automated build system. [Toltecmk](https://github.com/toltec-dev/build) could also be used instead, if you just need to compile a single standalone package. 5 | 6 | To proceed, create a local clone of the Git repository. 7 | 8 | ```sh 9 | git clone https://github.com/toltec-dev/toltec 10 | ``` 11 | 12 | You’ll be on the `stable` branch by default. 13 | If you want to build the `testing` branch, switch to it manually. 14 | 15 | ### Running a Build 16 | 17 | Before running the build, make sure you have all the required dependencies: 18 | 19 | * Docker 20 | * bsdtar 21 | * Python 3.10 22 | 23 | You’ll also need all the Python modules listed in [requirements.txt](../requirements.txt) (install them by running `pip install --user -r requirements.txt` or using a [virtual environment](https://docs.python.org/3/tutorial/venv.html)). 24 | 25 | To start the build, run `make repo-local`. 26 | This will be a long process, so you may want to grab a cup of coffee. 27 | The build will involve downloading Toltec’s Docker images, which are around 1 GB each. 28 | Once the build completes, the artifacts are available under `build/repo`. 29 | 30 | ### Running Checks 31 | 32 | Automated code checks help identify parts of the code that do not comply with the style guide or contain potential errors. 33 | To run them, you’ll need to install the following dependencies: 34 | 35 | * shfmt 36 | * Shellcheck 37 | 38 | To check for common errors, run `make lint`. 39 | To check for style guide errors, run `make format`. 40 | You can also use `make format-fix` to automatically fix style guide issues (this will change the source files in your local copy!). 41 | -------------------------------------------------------------------------------- /docs/code_of_conduct.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | 3 | Please see [the Toltec organization’s code of conduct document](https://github.com/toltec-dev/organization/blob/main/docs/code_of_conduct.md). -------------------------------------------------------------------------------- /docs/opkg.md: -------------------------------------------------------------------------------- 1 | ## Opkg and `.ipk` Files 2 | 3 | Toltec packages are meant to be used with [Opkg](https://git.yoctoproject.org/cgit/cgit.cgi/opkg), a lightweight package manager targeting embedded devices like the reMarkable. 4 | Opkg is developed both by [OpenWrt](https://git.openwrt.org/project/opkg-lede.git) and by the [Yocto Project](https://git.yoctoproject.org/cgit/cgit.cgi/opkg/). 5 | The Toltec distribution is built on top of [Entware](https://github.com/Entware/Entware) which provides device-agnostic Opkg-compatible packages. 6 | 7 | > Opkg is a fork of [ipkg](https://en.wikipedia.org/wiki/Ipkg), the package manager used in NSLU2's [Optware](http://www.nslu2-linux.org/wiki/Optware/), which is designed to add software to stock firmware of embedded devices. 8 | > — [OpenWrt's documentation](https://openwrt.org/docs/guide-user/additional-software/opkg) 9 | 10 | ### What is the `.ipk` Format? 11 | 12 | The package format is similar to Debian packages (`.deb`). 13 | It’s a `.tar.gz` archive with three files: 14 | 15 | - `control.tar.gz`: Sub-archive with metadata about the package itself. 16 | - `control`: Text file containing information about the package. 17 | See [the Debian documentation](https://www.debian.org/doc/debian-policy/ch-controlfields.html) for details about the value and expected format for each field. 18 | - `preinst`, `postinst`, `prerm`, `postrm`: Optional shell scripts that are run before and after installation or removal of the package, if provided. 19 | See [the Debian documentation](https://www.debian.org/doc/debian-policy/ap-flowcharts.html) for more information about when and how those scripts are invoked. 20 | - `conffiles`: List of files to keep upon upgrading the package (optional). 21 | - `data.tar.gz`: Sub-archive with the actual contents of the package (binaries, configuration files, data) arranged in a folder structure that mirrors the one of your device’s root folder. 22 | - `debian-binary`: Text file that contains the value `2.0`. 23 | Used for telling apart normal `.tar.gz` archives from actual packages. 24 | 25 | To see an example of a `.ipk` package, you can download one from Toltec’s [package listing](https://toltec-dev.org/stable) and dissect its contents with your archive manager. 26 | 27 | ### How are Packages Distributed? 28 | 29 | Entware and Toltec both publish repository feeds which list the available packages in a machine-readable format. 30 | ([Entware’s feed](https://bin.entware.net/armv7sf-k3.2/Packages), [Toltec’s feed](https://toltec-dev.org/stable/Packages).) 31 | The package manager automatically download the feeds listed in `/opt/etc/opkg.conf`, builds an internal index of available packages, and offers the end-user to manage those packages. 32 | 33 | ### Other Resources 34 | 35 | * [Opkg: Debian’s Little Cousin](https://elinux.org/images/2/24/Opkg_debians_little_cousin.pdf) (Alejandro del Castillo, 2020). A presentation about Opkg’s history, differences and similarities to Debian, and dependency resolution challenges. 36 | * [Managing a custom opkg repository](https://jumpnowtek.com/yocto/Managing-a-private-opkg-repository.html) (Jumpnow Technologies, 2019). Information about what is needed to setup an Opkg repository. 37 | * [Building opkg .ipk packages by hand](https://raymii.org/s/tutorials/Building_IPK_packages_by_hand.html) (Remy van Elst, 2019). Information about how to create a functional `.ipk` package. 38 | -------------------------------------------------------------------------------- /docs/security.md: -------------------------------------------------------------------------------- 1 | ## Security Policy 2 | 3 | Please see [the Toltec organization’s security policy](https://github.com/toltec-dev/organization/blob/main/docs/security.md). 4 | -------------------------------------------------------------------------------- /package/.shellcheckrc: -------------------------------------------------------------------------------- 1 | # vim: set ft=sh: 2 | # Configuration for Shellcheck in package recipes 3 | # See 4 | 5 | # Do not warn about unguarded `cd`s since recipes are always executed 6 | # with the -e flag set 7 | disable=SC2164 8 | 9 | # Do not warn about unused variables since metadata fields are expected to 10 | # not necessarily be used in the recipes 11 | disable=SC2034 12 | 13 | # Do not warn about undeclared variables since recipes may use build variables 14 | # such as `srcdir` or `pkgdir` 15 | disable=SC2154 16 | -------------------------------------------------------------------------------- /package/7zip/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | pkgnames=(7zip) 5 | pkgdesc="Metapackage for 7-zip" 6 | url="https://www.7-zip.org/" 7 | section="utils" 8 | pkgver=23.01-2 9 | timestamp=2023-06-20T00:00:00Z 10 | maintainer="Eeems " 11 | license=LGPL-2.1-or-later 12 | installdepends=(7-zip) 13 | 14 | package() { 15 | true 16 | } 17 | -------------------------------------------------------------------------------- /package/Compatibility: -------------------------------------------------------------------------------- 1 | rm1=2.6.1.71 2 | rm1=2.6.2.75 3 | rm1=2.7.0.9 4 | rm1=2.7.0.30 5 | rm1=2.7.0.36 6 | rm1=2.7.0.44 7 | rm1=2.7.0.51 8 | rm1=2.8.0.81 9 | rm1=2.8.0.86 10 | rm1=2.8.0.98 11 | rm1=2.9.0.153 12 | rm1=2.9.0.204 13 | rm1=2.9.0.210 14 | rm1=2.9.1.217 15 | rm1=2.9.1.236 16 | rm1=2.10.2.356 17 | rm1=2.10.3.379 18 | rm1=2.11.0.442 19 | rm1=2.12.1.527 20 | rm1=2.12.2.573 21 | rm1=2.12.3.606 22 | rm1=2.13.0.758 23 | rm1=2.14.0.861 24 | rm1=2.14.1.866 25 | rm1=2.14.3.958 26 | rm1=2.14.3.977 27 | rm1=2.14.3.1005 28 | rm1=2.14.3.1047 29 | rm1=2.15.0.1067 30 | rm1=2.15.1.1189 31 | rm1=3.0.4.1305 32 | rm1=3.2.2.1581 33 | rm1=3.2.3.1595 34 | rm1=3.3.2.1666 35 | 36 | rm2=2.6.1.71 37 | rm2=2.6.2.75 38 | rm2=2.7.0.9 39 | rm2=2.7.0.30 40 | rm2=2.7.0.36 41 | rm2=2.7.0.44 42 | rm2=2.7.0.51 43 | rm2=2.7.1.53 44 | rm2=2.8.0.81 45 | rm2=2.8.0.86 46 | rm2=2.8.0.98 47 | rm2=2.9.0.153 48 | rm2=2.9.0.204 49 | rm2=2.9.0.210 50 | rm2=2.9.1.217 51 | rm2=2.9.1.236 52 | rm2=2.10.2.356 53 | rm2=2.10.3.379 54 | rm2=2.11.0.442 55 | rm2=2.12.1.527 56 | rm2=2.12.2.573 57 | rm2=2.12.3.606 58 | rm2=2.13.0.758 59 | rm2=2.14.0.861 60 | rm2=2.14.1.866 61 | rm2=2.14.3.958 62 | rm2=2.14.3.977 63 | rm2=2.14.3.1005 64 | rm2=2.14.3.1047 65 | rm2=2.15.0.1067 66 | rm2=2.15.1.1189 67 | rm2=3.0.4.1305 68 | rm2=3.2.2.1581 69 | rm2=3.2.3.1595 70 | rm2=3.3.2.1666 71 | -------------------------------------------------------------------------------- /package/appmarkable/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(appmarkable) 6 | pkgdesc="Front-end for apps that do not have a graphical user interface" 7 | url="https://github.com/LinusCDE/appmarkable" 8 | pkgver=0.1.3-1 9 | timestamp=2024-06-01T21:00Z 10 | section="devel" 11 | maintainer="Linus K. " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=rust:v3.1 17 | source=(https://github.com/LinusCDE/appmarkable/archive/0463ffc5bdaf29ff0a0e92fb15a90b06e310c417.zip) 18 | sha256sums=(bb45ed03a360f1a58e58e5a8e3176008e8e63053fc46925d20be92b532a02822) 19 | 20 | build() { 21 | # Fall back to system-wide config 22 | rm .cargo/config 23 | cargo build --release --bin appmarkable 24 | } 25 | 26 | package() { 27 | install -D -m 755 -t "$pkgdir"/opt/bin \ 28 | "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/appmarkable 29 | } 30 | -------------------------------------------------------------------------------- /package/bandwhich/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(bandwhich) 6 | pkgdesc="CLI network utilization tool" 7 | url=https://github.com/imsnif/bandwhich 8 | pkgver=0.22.2-1 9 | timestamp=2024-01-27T19:33Z 10 | section="utils" 11 | maintainer="gbyl " 12 | license=MIT 13 | 14 | image=rust:v3.1 15 | source=("https://github.com/imsnif/bandwhich/archive/refs/tags/v${pkgver%-*}.zip") 16 | sha256sums=(5d1eaa1796ec3c16f349cb6b00bd9dba6d425e9323d63af648a41cd68c5d456b) 17 | 18 | build() { 19 | cargo build --release 20 | } 21 | 22 | package() { 23 | install -D -m 755 "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/bandwhich "$pkgdir"/opt/bin/bandwhich 24 | } 25 | -------------------------------------------------------------------------------- /package/bash-completion/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(bash-completion) 6 | pkgdesc="Programmable completion functions for bash" 7 | url=https://github.com/scop/bash-completion 8 | pkgver=2.11-3 9 | timestamp=2020-07-25T00:00Z 10 | section="utils" 11 | maintainer="Linus K. " 12 | license=GPL-2.0-only 13 | 14 | # Based on the ArchLinux PKGBUILD file: 15 | # https://github.com/archlinux/svntogit-packages/blob/packages/bash-completion/trunk/PKGBUILD 16 | 17 | image=base:v2.1 18 | source=(https://github.com/scop/bash-completion/releases/download/2.11/bash-completion-2.11.tar.xz) 19 | sha256sums=(73a8894bad94dee83ab468fa09f628daffd567e8bef1a24277f1e9a0daf911ac) 20 | 21 | build() { 22 | ./configure --prefix=/opt/usr --sysconfdir=/etc 23 | make 24 | } 25 | 26 | package() { 27 | (cd "$srcdir" && make DESTDIR="$pkgdir" install) 28 | } 29 | 30 | configure() { 31 | echo "Bash completions should take affect on next login." 32 | echo "To apply them immediately, run" 33 | echo " $ source /etc/profile.d/bash_completion.sh" 34 | } 35 | -------------------------------------------------------------------------------- /package/calculator/calculator.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=calculator 5 | desc=Touch-based calculator 6 | call=/opt/bin/calculator 7 | term=: 8 | imgFile=calculator 9 | -------------------------------------------------------------------------------- /package/calculator/calculator.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | image/svg+xml 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | + 19 | 20 | 21 | -------------------------------------------------------------------------------- /package/calculator/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(calculator) 6 | pkgdesc="Touch-based calculator" 7 | url=https://github.com/reHackable/Calculator 8 | pkgver=0.0.0-16 9 | timestamp=2020-08-20T12:28Z 10 | section="math" 11 | maintainer="Mattéo Delabre " 12 | license=GPL-3.0-or-later 13 | installdepends=(display) 14 | makedepends=(build:imagemagick build:librsvg2-bin) 15 | flags=(patch_rm2fb) 16 | 17 | image=qt:v2.1 18 | source=( 19 | https://github.com/reHackable/Calculator/archive/7b8be5de12f1536bc04b6216abbf26f998097bf4.zip 20 | calculator.draft 21 | calculator.svg 22 | ) 23 | sha256sums=( 24 | 02116d385983f6c816374eb6d8b67e53a4a9650e42b0733ab2e145e8dcf87557 25 | SKIP 26 | SKIP 27 | ) 28 | 29 | build() { 30 | qmake Calculator.pro 31 | make 32 | convert +set date:create +set date:modify calculator.{svg,png} 33 | } 34 | 35 | package() { 36 | install -D -m 755 "$srcdir"/Calculator "$pkgdir"/opt/bin/calculator 37 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/calculator.draft 38 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/calculator.png 39 | } 40 | -------------------------------------------------------------------------------- /package/changescrn/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(changescrn) 6 | pkgdesc="Change sleep/suspend/poweroff/reboot screens" 7 | url=https://github.com/pr0fsmith/rMscreens/ 8 | pkgver=1.0.0-2 9 | timestamp=2022-03-15T01:28:33Z 10 | section="utils" 11 | maintainer="pr0fsmith " 12 | license=GPL-3.0 13 | 14 | source=(https://github.com/pr0fsmith/rMscreens/archive/6d04e97b3997873f0f8b1bd50283ae7ed9be7abd.zip) 15 | sha256sums=(3c2e8b0952d848d7326c0a4ce45da625dd7fd0fbc6b564a2d40c3b97015138e3) 16 | 17 | package() { 18 | install -Dm755 "$srcdir"/changescrn "$pkgdir/opt/bin/changescrn" 19 | } 20 | 21 | configure() { 22 | if [ ! -d /opt/usr/share/backupscrns ] || [ -z "$(ls -A /opt/usr/share/backupscrns)" ]; then 23 | changescrn -b 24 | fi 25 | } 26 | 27 | preremove() { 28 | changescrn -r all 29 | } 30 | -------------------------------------------------------------------------------- /package/chessmarkable/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(chessmarkable) 6 | pkgdesc="Chess game" 7 | url=https://github.com/LinusCDE/chessmarkable 8 | pkgver=0.8.0-2 9 | timestamp=2021-07-22T12:04Z 10 | section="games" 11 | maintainer="Linus K. " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=rust:v2.1 17 | source=(https://github.com/LinusCDE/chessmarkable/archive/0.8.0-1.zip) 18 | sha256sums=(17675d30bb45050c1db5bc81d3d76b99a1b18e497c9a331177b853a5f9aa12af) 19 | 20 | build() { 21 | # Fall back to system-wide config 22 | rm .cargo/config 23 | cargo build --release --bin chessmarkable 24 | } 25 | 26 | package() { 27 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/chessmarkable 28 | install -D -m 644 "$srcdir"/oxide "$pkgdir"/opt/etc/draft/chessmarkable 29 | install -D -m 644 "$srcdir"/icon.png "$pkgdir"/opt/etc/draft/icons/chessmarkable.png 30 | } 31 | -------------------------------------------------------------------------------- /package/debian-chroot/debian-chroot.conf: -------------------------------------------------------------------------------- 1 | chroot_path="/home/root/.local/share/debian" 2 | -------------------------------------------------------------------------------- /package/debian-chroot/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(debian-chroot debootstrap) 6 | section="utils" 7 | # Each package has it's own timestamp override below 8 | timestamp=2023-12-22T19:37Z 9 | maintainer="Eeems " 10 | installdepends=(display) 11 | flags=(nostrip) 12 | 13 | source=( 14 | https://github.com/Eeems-org/remarkable-debian-chroot/archive/ea12a1bf851f412e8df4b59fe072bce26bb72571.zip 15 | https://salsa.debian.org/installer-team/debootstrap/-/archive/1.0.133/debootstrap-1.0.133.tar.gz 16 | debian-chroot.conf 17 | ) 18 | sha256sums=( 19 | 3fcd571ba1aa1a5c55a32767c34e6939e0c0e8ad9213425c6d66d25300fe24b8 20 | 734af3492eea99de940853e2c00e1a9ebd65c463362155f613aa24b9cc3336a0 21 | SKIP 22 | ) 23 | 24 | debian-chroot() { 25 | pkgdesc="A minimal Debian chroot for the reMarkable tablet" 26 | url=https://github.com/Eeems-Org/remarkable-debian-chroot 27 | pkgver=0.0.0-1 28 | timestamp=2023-12-22T19:37Z 29 | license=MIT 30 | installdepends=(debootstrap lsof) 31 | package() { 32 | install -D -m 755 \ 33 | "$srcdir"/bin/debian-chroot \ 34 | "$pkgdir"/opt/bin/debian-chroot 35 | install -D -m 655 \ 36 | "$srcdir"/debian-chroot.conf \ 37 | "$pkgdir"/home/root/.config/debian-chroot.conf 38 | mkdir -p "$pkgdir"/opt/etc/ 39 | ln -s /home/root/.config/debian-chroot.conf \ 40 | "$pkgdir"/opt/etc/debian-chroot.conf 41 | source "$srcdir"/debian-chroot.conf 42 | mkdir -p "$pkgdir"/opt/lib/ 43 | ln -s "$chroot_path" "$pkgdir"/opt/lib/debian-chroot 44 | } 45 | configure() { 46 | # Force debian chroot to install iteself 47 | debian-chroot true 48 | } 49 | preremove() { 50 | source /home/root/.config/debian-chroot.conf 51 | if lsof "$chroot_path" 2> /dev/null | grep "$chroot_path"; then 52 | echo "Error: debian-chroot has running processes" 53 | exit 1 54 | fi 55 | if grep -q "$chroot_path " /proc/mounts; then 56 | /bin/umount -R "$chroot_path" 57 | fi 58 | cp /home/root/.config/debian-chroot.conf /tmp/_debian-chroot.conf 59 | } 60 | postremove() { 61 | source /tmp/_debian-chroot.conf 62 | rm -rf "$chroot_path" 63 | rm /tmp/_debian-chroot.conf 64 | } 65 | } 66 | 67 | debootstrap() { 68 | pkgdesc="debootstrap is a tool which will install a Debian base system into a subdirectory of another, already installed system." 69 | installdepends=(perl ar) 70 | url=https://wiki.debian.org/Debootstrap 71 | pkgver=1.0.133-1 72 | timestamp=2023-10-21T11:38Z 73 | license=MIT 74 | package() { 75 | cd "$srcdir" 76 | sed -i 's|/usr/sbin|/sbin|' Makefile 77 | make DESTDIR="$pkgdir"/opt install 78 | sed -i 's|DEBOOTSTRAP_DIR=/usr/share/debootstrap|DEBOOTSTRAP_DIR=/opt/usr/share/debootstrap|' "$pkgdir"/opt/sbin/debootstrap 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /package/display/rm2fb-client: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | LD_PRELOAD=/opt/lib/librm2fb_client.so.1 exec "$@" 5 | -------------------------------------------------------------------------------- /package/display/rm2fb-preload.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | Environment="LD_PRELOAD=/opt/lib/librm2fb_client.so.1" 3 | -------------------------------------------------------------------------------- /package/display/rm2fb-preload.env: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | # Please do not modify files shipped by Toltec, or they risk being 4 | # overwritten with updates. Instead create your own files in this directory. 5 | if [[ -f /dev/shm/swtfb.01 ]]; then 6 | export LD_PRELOAD="$LD_PRELOAD:/opt/lib/librm2fb_client.so.1" 7 | else 8 | echo "rm2fb server is not running: starting without rm2fb client" 9 | fi 10 | -------------------------------------------------------------------------------- /package/display/rm2fb.service: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | [Unit] 5 | Description=reMarkable 2 Framebuffer Server 6 | Before=xochitl.service launcher.service remarkable-reboot.service remarkable-shutdown.service 7 | After=opt.mount 8 | StartLimitInterval=30 9 | StartLimitBurst=5 10 | ConditionFileNotEmpty=/opt/lib/librm2fb_server.so.1 11 | 12 | [Service] 13 | Type=notify 14 | ExecStart=/usr/bin/xochitl 15 | Restart=on-failure 16 | RestartSec=5 17 | Environment="HOME=/home/root" 18 | Environment="LD_PRELOAD=/opt/lib/librm2fb_server.so.1" 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /package/doomarkable/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(doomarkable) 6 | pkgdesc="DOOM game" 7 | url=https://github.com/LinusCDE/doomarkable 8 | pkgver=0.4.1-2 9 | timestamp=2021-10-31T16:15Z 10 | section="games" 11 | maintainer="Linus K. " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=rust:v2.2 17 | source=(https://github.com/LinusCDE/doomarkable/archive/0.4.1.tar.gz) 18 | sha256sums=(d1cc2a37e769039e6e7a2f3090f77657693591a2c28ac55e51f89607d06e8b02) 19 | 20 | build() { 21 | # Fall back to system-wide config 22 | rm .cargo/config 23 | cargo build --release 24 | } 25 | 26 | package() { 27 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/doomarkable 28 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/doomarkable.draft 29 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/doomarkable.png 30 | } 31 | -------------------------------------------------------------------------------- /package/dotnet/dotnet-profile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 3 | export DOTNET_ROOT=/opt/usr/share/dotnet/ 4 | -------------------------------------------------------------------------------- /package/draft/draft.service: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | [Unit] 5 | Description=Launcher which wraps around the standard interface 6 | After=home.mount 7 | StartLimitIntervalSec=600 8 | StartLimitBurst=4 9 | 10 | [Service] 11 | ExecStart=/opt/bin/draft 12 | Restart=on-failure 13 | RestartSec=5 14 | Environment="HOME=/home/root" 15 | 16 | [Install] 17 | Alias=launcher.service 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /package/draft/launcherctl-draft: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | draft_pid() { 4 | systemctl show --no-pager --property MainPID draft.service | sed 's|MainPID=||' 5 | } 6 | kill_pid() { 7 | pid="$1" 8 | if [[ "$(awk '{print $3}' "/proc/${pid}/stat")" == "T" ]]; then 9 | kill -CONT "$pid" 10 | fi 11 | kill -TERM "$pid" 12 | # Wait 5s for process to exit 13 | start="$(date +'%s')" 14 | while kill -0 "$pid" 2> /dev/null; do 15 | sleep 0.5 16 | if [ "$(date +'%s')" -gt $((start + 5)) ]; then 17 | break 18 | fi 19 | done 20 | if kill -0 "$pid" 2> /dev/null; then 21 | # If process is still running, force kill it 22 | kill -KILL "$pid" 23 | fi 24 | } 25 | case "$1" in 26 | is-active) 27 | systemctl is-active --quiet draft.service 28 | ;; 29 | is-enabled) 30 | systemctl is-enabled --quiet draft.service 31 | ;; 32 | logs) 33 | if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then 34 | journalctl --follow --all --unit draft.service 35 | else 36 | journalctl --no-pager --all --unit draft.service 37 | fi 38 | ;; 39 | start) 40 | systemctl start draft.service 41 | ;; 42 | stop) 43 | systemctl stop draft.service 44 | ;; 45 | enable) 46 | systemctl enable draft.service 47 | ;; 48 | disable) 49 | systemctl disable draft.service 50 | ;; 51 | apps) 52 | find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do 53 | grep 'name=' "$file" | sed 's|^name=||' 54 | done 55 | ;; 56 | close) 57 | find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do 58 | if [[ "$(grep 'name=' "$file" | sed 's|^name=||')" == "$2" ]]; then 59 | term="$(grep 'term=' "$file" | sed 's|^term=||')" 60 | if [ -z "$term" ]; then 61 | echo "No term= configuration specified for ${2}" 62 | exit 1 63 | fi 64 | $term 65 | call="$(grep 'call=' "$file" | sed 's|^call=||')" 66 | name="$(grep 'name=' "$file" | sed 's|^name=||')" 67 | /opt/libexec/ps-procps-ng --ppid "$(draft_pid)" -o pid | tail -n +2 | while read -r pid; do 68 | if [[ "$(tr -d '\0' < "/proc/${pid}/cmdline")" == "$call" ]]; then 69 | kill_pid "$pid" 70 | break 71 | fi 72 | done 73 | fi 74 | done 75 | ;; 76 | running) 77 | pid=$(draft_pid) 78 | find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do 79 | call="$(grep 'call=' "$file" | sed 's|^call=||')" 80 | name="$(grep 'name=' "$file" | sed 's|^name=||')" 81 | /opt/libexec/ps-procps-ng --ppid "$(draft_pid)" -o pid | tail -n +2 | while read -r pid; do 82 | if [[ "$(tr -d '\0' < "/proc/${pid}/cmdline")" == "$call" ]]; then 83 | echo "$name" 84 | break 85 | fi 86 | done 87 | done 88 | ;; 89 | *) 90 | echo "Draft does not support this method" 91 | exit 1 92 | ;; 93 | esac 94 | -------------------------------------------------------------------------------- /package/draft/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(draft) 6 | pkgdesc="Launcher which wraps around the standard interface" 7 | url=https://github.com/dixonary/draft-reMarkable 8 | pkgver=0.2.0-25 9 | timestamp=2020-07-20T10:23Z 10 | section="launchers" 11 | maintainer="Mattéo Delabre " 12 | license=Apache-2.0 13 | installdepends=(xochitl display procps-ng-ps) 14 | flags=(patch_rm2fb) 15 | 16 | image=qt:v2.1 17 | source=( 18 | https://github.com/dixonary/draft-reMarkable/archive/5bd660a2fd07eba166c6110d2b48cfc58ee67e58.zip 19 | draft.service 20 | launcherctl-draft 21 | ) 22 | sha256sums=( 23 | c41d7a4fd537c54d787018fd764421dbf7dd64306ca800875283e05eef99173e 24 | SKIP 25 | SKIP 26 | ) 27 | 28 | build() { 29 | qmake draft.pro 30 | make 31 | } 32 | 33 | package() { 34 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/draft 35 | 36 | install -d "$pkgdir"/opt/share/draft "$pkgdir"/usr/share 37 | ln -s /opt/share/draft "$pkgdir"/usr/share/draft 38 | cp -r "$srcdir"/qml "$pkgdir"/opt/share/draft 39 | cp -r "$srcdir"/js "$pkgdir"/opt/share/draft 40 | 41 | install -d "$pkgdir"/opt/etc/draft "$pkgdir"/etc 42 | ln -s /opt/etc/draft "$pkgdir"/etc/draft 43 | cp -r "$srcdir"/extra-files/draft/* "$pkgdir"/opt/etc/draft 44 | rm "$pkgdir"/opt/etc/draft/01-xochitl 45 | rm "$pkgdir"/opt/etc/draft/icons/xochitl.png 46 | rm "$pkgdir"/opt/etc/draft/02-fingerterm 47 | rm "$pkgdir"/opt/etc/draft/icons/fingerterm.png 48 | mv "$pkgdir"/opt/etc/draft/{99-,}shutdown 49 | 50 | install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/draft.service 51 | install -D -T -m 755 "$srcdir"/launcherctl-draft "$pkgdir"/opt/share/launcherctl/"$pkgname" 52 | } 53 | 54 | configure() { 55 | systemctl daemon-reload 56 | 57 | if ! launcherctl is-current-launcher "$pkgname"; then 58 | echo "" 59 | echo "Run the following command(s) to use $pkgname as your launcher" 60 | echo "launcherctl switch-launcher --start $pkgname" 61 | echo "" 62 | fi 63 | } 64 | 65 | preremove() { 66 | # Just in case more than one launcher is active, do individual checks 67 | if launcherctl is-active-launcher "$pkgname" || launcherctl is-enabled-launcher "$pkgname"; then 68 | launcherctl switch-launcher --start xochitl 69 | fi 70 | } 71 | 72 | postremove() { 73 | systemctl daemon-reload 74 | } 75 | -------------------------------------------------------------------------------- /package/entware-rc/entware-rc@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Entware %I service 3 | After=opt.mount 4 | 5 | [Service] 6 | ExecStart=/opt/etc/init.d/%I start 7 | ExecStop=/opt/etc/init.d/%I stop 8 | Type=forking 9 | GuessMainPID=true 10 | Restart=on-failure 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /package/entware-rc/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmall) 6 | pkgnames=(entware-rc) 7 | pkgdesc="Manage entware installed services" 8 | url=https://toltec-dev.org/ 9 | pkgver=0.1-1 10 | timestamp=2024-05-22T22:59:03Z 11 | section="utils" 12 | maintainer="Eeems " 13 | license=MIT 14 | installdepends=() 15 | 16 | source=( 17 | entware-rc@.service 18 | rcctl 19 | ) 20 | sha256sums=( 21 | SKIP 22 | SKIP 23 | ) 24 | 25 | package() { 26 | install -D -m 666 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/entware-rc@.service 27 | install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/rcctl 28 | } 29 | 30 | configure() { 31 | systemctl daemon-reload 32 | echo "" 33 | echo "You can use rcctl to manage services installed by entware" 34 | } 35 | 36 | preremove() { 37 | rcctl list | xargs -I {} systemctl disable --now entware-rc@{} 38 | } 39 | -------------------------------------------------------------------------------- /package/entware-rc/rcctl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | help() { 3 | echo "Usage: rcctl " 4 | echo " commands:" 5 | echo " help: Display this message and exit" 6 | echo " start : Start a service" 7 | echo " stop : Stop a service" 8 | echo " restart : Restart a service" 9 | echo " enable : Enable service startup on boot" 10 | echo " disable : Disable service startup on boot" 11 | echo " status []: View the current status of services" 12 | echo " logs [-f|--follow] : View logs for a service" 13 | echo " list: List available services" 14 | } 15 | if [[ $1 == "help" ]] || [[ $1 == "--help" ]]; then 16 | help 17 | elif [[ $1 == "start" ]] \ 18 | || [[ $1 == "stop" ]] \ 19 | || [[ $1 == "restart" ]] \ 20 | || [[ $1 == "enable" ]] \ 21 | || [[ $1 == "disable" ]]; then 22 | if [ $# -ge 3 ]; then 23 | echo "Too many arguments" 24 | exit 1 25 | elif [ $# -lt 2 ]; then 26 | echo "Too few arguments" 27 | exit 1 28 | fi 29 | systemctl "$1" "entware-rc@$2.service" 30 | elif [[ $1 == "status" ]]; then 31 | if [ $# -ge 3 ]; then 32 | echo "Too many arguments" 33 | exit 1 34 | elif [ $# -eq 1 ]; then 35 | "$0" list | xargs -rn1 "$0" status 36 | else 37 | s="entware-rc@${2}.service" 38 | echo "${2}" "$(systemctl is-active "${s}")" "$(systemctl is-enabled "${s}")" \ 39 | | grep --color=always '\(disabled\|inactive\|$\)' 40 | fi 41 | elif [[ $1 == "logs" ]]; then 42 | if [ $# -ge 4 ]; then 43 | echo "Too many arguments" 44 | exit 1 45 | elif [ $# -lt 2 ]; then 46 | echo "Too few arguments" 47 | exit 1 48 | elif [ $# -eq 3 ] && [[ "$2" != "-f" ]] && [[ "$2" != "--follow" ]]; then 49 | echo "Invalid arguments" 50 | exit 1 51 | fi 52 | if [ $# -eq 3 ]; then 53 | journalctl --no-pager -all --follow --unit "entware-rc@${3}.service" 54 | else 55 | journalctl --no-pager -all --unit "entware-rc@${2}.service" 56 | fi 57 | elif [[ $1 == "list" ]]; then 58 | /opt/bin/find /opt/etc/init.d/ -perm '-u+x' -name 'S*' | xargs -rn1 basename 59 | else 60 | help 61 | exit 1 62 | fi 63 | -------------------------------------------------------------------------------- /package/evtest/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(evtest) 6 | pkgdesc="Kernel evdev device information and monitor" 7 | url=https://gitlab.freedesktop.org/libevdev/evtest 8 | pkgver=1.34-3 9 | timestamp=2020-12-30T02:52Z 10 | section="utils" 11 | maintainer="Linus K. " 12 | license=GPL-2.0-only 13 | makedepends=(build:automake) 14 | 15 | image=base:v2.1 16 | source=("https://gitlab.freedesktop.org/libevdev/evtest/-/archive/evtest-${pkgver%-*}/evtest-evtest-${pkgver%-*}.zip") 17 | sha256sums=(62f7e34c5bab91b5015de5b056d79051c677c5bd5702facb2885f8e4ba0df84c) 18 | 19 | build() { 20 | export CC=arm-linux-gnueabihf-gcc 21 | ./autogen.sh --host armv7 22 | ./configure --host armv7 23 | make 24 | } 25 | 26 | package() { 27 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/evtest 28 | } 29 | -------------------------------------------------------------------------------- /package/fbink/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(fbink fbdepth fbink-doom) 6 | url=https://github.com/NiLuJe/FBInk 7 | pkgver=1.25.0-1 8 | timestamp=2022-12-05T02:50:38Z 9 | maintainer="Mattéo Delabre " 10 | license=GPL-3.0 11 | installdepends=(display) 12 | flags=(patch_rm2fb) 13 | 14 | image=base:v2.1 15 | 16 | prepare() { 17 | git clone --depth=1 --recurse-submodules --branch v${pkgver%-*} https://github.com/NiLuJe/FBInk.git "$srcdir"/FBInk 18 | } 19 | 20 | build() { 21 | pushd FBInk 22 | REMARKABLE=1 make remarkable 23 | REMARKABLE=1 make fbdepth 24 | REMARKABLE=1 make utils 25 | popd 26 | } 27 | 28 | fbink() { 29 | pkgdesc="Print text and images to the framebuffer" 30 | section="devel" 31 | 32 | package() { 33 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/FBInk/Release/fbink 34 | } 35 | } 36 | 37 | fbdepth() { 38 | pkgdesc="Change rotation and bitdepth of the screen" 39 | section="utils" 40 | 41 | package() { 42 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/FBInk/Release/fbdepth 43 | } 44 | } 45 | 46 | fbink-doom() { 47 | pkgdesc="Doom fire effect stress test" 48 | section="utils" 49 | 50 | package() { 51 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/FBInk/Release/doom 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /package/fingerterm/fingerterm.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=fingerterm 5 | desc=Terminal emulator with an on-screen touch keyboard 6 | call=/opt/bin/fingerterm 7 | term=: 8 | imgFile=fingerterm 9 | -------------------------------------------------------------------------------- /package/fingerterm/fingerterm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toltec-dev/toltec/9d15d2ddea4c58fc93e38f9ca0aed4d4afc5f9dc/package/fingerterm/fingerterm.png -------------------------------------------------------------------------------- /package/fingerterm/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(fingerterm) 6 | pkgdesc="Terminal emulator with an on-screen touch keyboard" 7 | url=https://github.com/dixonary/fingerterm-reMarkable 8 | pkgver=1.3.5-15 9 | timestamp=2020-10-27T12:02Z 10 | section="admin" 11 | maintainer="Mattéo Delabre " 12 | license=GPL-2.0-or-later 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=qt:v2.1 17 | source=( 18 | https://github.com/dixonary/fingerterm-reMarkable/archive/02c17b5b485743c698e005ca89366c32b66aa044.zip 19 | fingerterm.png 20 | fingerterm.draft 21 | ) 22 | sha256sums=( 23 | 1e2290f876ca97dceda5b25e04517d793ac0a040fa4d6004dd34e5b507de534c 24 | SKIP 25 | SKIP 26 | ) 27 | 28 | build() { 29 | sed -i 's,DEPLOYMENT_PATH = /usr,DEPLOYMENT_PATH = /opt,' fingerterm.pro 30 | qmake fingerterm.pro 31 | make 32 | } 33 | 34 | package() { 35 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/fingerterm 36 | 37 | install -d "$pkgdir"/opt/share/fingerterm 38 | install -D -m 644 -t "$pkgdir"/opt/share/fingerterm "$srcdir"/qml/* 39 | cp -r "$srcdir"/icons "$pkgdir"/opt/share/fingerterm 40 | cp -r "$srcdir"/data "$pkgdir"/opt/share/fingerterm 41 | 42 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/fingerterm.draft 43 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/fingerterm.png 44 | } 45 | -------------------------------------------------------------------------------- /package/folly/folly.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | name=folly 4 | desc=Z-machine interpreter for interactive fiction 5 | call=/opt/bin/folly 6 | -------------------------------------------------------------------------------- /package/folly/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(folly) 6 | pkgdesc="Z-machine interpreter for interactive fiction" 7 | url="https://github.com/bkirwi/folly" 8 | pkgver=0.0.1-4 9 | timestamp=2022-04-18T17:50:16Z 10 | section=games 11 | maintainer="Ben Kirwin " 12 | license=MIT 13 | installdepends=(display) 14 | makedepends=(build:libclang-14-dev build:clang-14 build:llvm-14-dev) 15 | 16 | image=rust:v2.3 17 | 18 | # Whitespace-separated list of source archives that are needed to build the package 19 | source=( 20 | https://github.com/bkirwi/folly/archive/fe47fedbc9b77207de89c34c8133fa0d66e5079b.zip 21 | folly.draft 22 | ) 23 | # SHA-256 checksums of the source archives above 24 | sha256sums=( 25 | 16d572cbe78605baa7df66e148e2a5083efd5a9642e2a033bf626207a1568a87 26 | SKIP 27 | ) 28 | 29 | build() { 30 | local cpp_includes 31 | local gcc_version 32 | gcc_version="$("$CROSS_COMPILE"gcc -dumpfullversion)" 33 | cpp_includes="$(realpath "$SYSROOT"/../include/c++/"$gcc_version")" 34 | 35 | # Arguments for bindgen's usage of clang 36 | export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$SYSROOT -I$cpp_includes \ 37 | -I$cpp_includes/$NGCONFIG" 38 | 39 | # Arguments for the gcc-based tensorflow build in the build.rs file of tflite-rs. 40 | export TFLITE_RS_MAKE_TARGET_TOOLCHAIN_PREFIX="$CROSS_COMPILE" 41 | export TFLITE_RS_MAKE_EXTRA_CFLAGS="$BINDGEN_EXTRA_CLANG_ARGS \ 42 | -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9" 43 | 44 | cargo build --release 45 | 46 | # Save the build system the trouble of stripping unused binaries 47 | rm -r target/release/build 48 | rm -r target/*/release/build 49 | } 50 | 51 | package() { 52 | # Install the app binary and the draft file 53 | install -D -m 755 "$srcdir"/target/*/release/folly "$pkgdir"/opt/bin/folly 54 | install -D -m 644 "$srcdir"/folly.draft "$pkgdir"/opt/etc/draft/folly.draft 55 | } 56 | -------------------------------------------------------------------------------- /package/fuse/fix-multiple-yylloc-definitions.patch: -------------------------------------------------------------------------------- 1 | diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l 2 | index 790fbf6c..e7eab4d7 100644 3 | --- a/scripts/dtc/dtc-lexer.l 4 | +++ b/scripts/dtc/dtc-lexer.l 5 | @@ -38,7 +38,7 @@ LINECOMMENT "//".*\n 6 | #include "srcpos.h" 7 | #include "dtc-parser.tab.h" 8 | 9 | -YYLTYPE yylloc; 10 | +extern YYLTYPE yylloc; 11 | extern bool treesource_error; 12 | 13 | /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ 14 | diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped 15 | index ba525c2f..a2fe8dbc 100644 16 | --- a/scripts/dtc/dtc-lexer.lex.c_shipped 17 | +++ b/scripts/dtc/dtc-lexer.lex.c_shipped 18 | @@ -637,7 +637,7 @@ char *yytext; 19 | #include "srcpos.h" 20 | #include "dtc-parser.tab.h" 21 | 22 | -YYLTYPE yylloc; 23 | +extern YYLTYPE yylloc; 24 | extern bool treesource_error; 25 | 26 | /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ 27 | -------------------------------------------------------------------------------- /package/fuse/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rm1os2 rm2os2) 6 | pkgnames=(fuse) 7 | pkgdesc="FUSE (Filesystem in Userspace) Kernel Module" 8 | url=https://github.com/libfuse/libfuse 9 | pkgver=1.0.0-5 10 | timestamp=2021-04-06T22:16Z 11 | section=kernel 12 | maintainer="plan5 <30434574+plan5@users.noreply.github.com>" 13 | license=GPL-2.0-only 14 | makedepends=(build:bc build:lzop build:git) 15 | flags=(nostrip) 16 | 17 | image=base:v2.1 18 | source=(fix-multiple-yylloc-definitions.patch) 19 | sha256sums=(SKIP) 20 | 21 | _kernelrepo=https://github.com/remarkable/linux 22 | _kernelrev=1774e2a6a091fdc081324e966d3db0aa9df75c0b 23 | _defconfig=arch/arm/configs/zero-gravitas_defconfig 24 | 25 | prepare() { 26 | cd "$srcdir" 27 | mkdir pkg 28 | git init linux 29 | cd linux 30 | git fetch --depth=1 "$_kernelrepo" "$_kernelrev" 31 | git checkout -f "$_kernelrev" 32 | git apply "$srcdir"/fix-multiple-yylloc-definitions.patch 33 | } 34 | 35 | build() { 36 | ( 37 | cd linux 38 | make mrproper 39 | touch .scmversion 40 | cp "$_defconfig" .config 41 | echo "CONFIG_FUSE_FS=m" >> .config 42 | make olddefconfig 43 | make fs/fuse/fuse.ko 44 | make modules_prepare 45 | ) 46 | 47 | KERNELRELEASE=$(cat linux/include/config/kernel.release) 48 | export MOD_INSTALL_PATH="pkg/$KERNELRELEASE" 49 | install -D -m 644 linux/fs/fuse/fuse.ko \ 50 | "$MOD_INSTALL_PATH/kernel/fs/fuse/fuse.ko" 51 | } 52 | 53 | package() { 54 | if [[ $arch = rm1os2 ]]; then 55 | mkdir -p "$pkgdir/lib/modules" 56 | cp -r "$srcdir/pkg"/* "$pkgdir/lib/modules" 57 | fi 58 | } 59 | 60 | configure() { 61 | if [[ $arch = rm1os2 ]]; then 62 | # Regenerate /lib/modules/[ver]/modules.devname to request the 63 | # creation of /dev/fuse used for on-demand loading of fuse 64 | depmod -a 65 | 66 | # Force creation of /dev/fuse so that the module gets autoloaded 67 | # on-demand (otherwise, the device needs to be rebooted or the module 68 | # needs to be manually loaded before it can work) 69 | systemctl restart kmod-static-nodes 70 | systemctl restart systemd-tmpfiles-setup-dev 71 | fi 72 | } 73 | 74 | postremove() { 75 | if [[ $arch = rm1os2 ]]; then 76 | echo 'Fuse (Kernel Module) has been removed.' 77 | echo 'The kernel module will remain loaded until you reboot, or you can attempt' 78 | echo 'to manually remove it by running "modprobe -r fuse".' 79 | depmod -a 80 | fi 81 | } 82 | 83 | postupgrade() { 84 | if [[ $arch = rm1os2 ]]; then 85 | echo 'Fuse (Kernel Module) has been upgraded.' 86 | echo 'The old kernel module will remain loaded until you reboot, or you can' 87 | echo 'attempt to manually remove it by running "modprobe -r fuse".' 88 | fi 89 | } 90 | -------------------------------------------------------------------------------- /package/gocryptfs/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos2) 6 | pkgnames=(gocryptfs) 7 | pkgdesc="An encrypted overlay filesystem written in Go." 8 | url="https://nuetzlich.net/gocryptfs/" 9 | _srcver=2.0-beta2 10 | pkgver="$_srcver"-3 11 | timestamp=2021-03-22 12 | section=utils 13 | maintainer="plan5 <30434574+plan5@users.noreply.github.com>" 14 | license=MIT 15 | installdepends=(fuse fuse-utils) 16 | 17 | image=golang:v2.1 18 | source=(https://github.com/rfjakob/gocryptfs/archive/v"$_srcver".zip) 19 | sha256sums=(3d66368cfc79a300de5a22fe01788d0c702f9107731db63fcd8850157d105cc0) 20 | 21 | prepare() { 22 | # Official build script runs compiled binary to show version. 23 | # This will cause the build to fail if built on another architecture 24 | # So the line will be removed here. 25 | sed -i "s/^.\/gocryptfs.*//" "$srcdir"/build.bash 26 | } 27 | 28 | build() { 29 | GOARCH=arm GOARM=7 ./build-without-openssl.bash 30 | } 31 | 32 | package() { 33 | mkdir -p "$pkgdir"/opt/bin 34 | install -D -m 755 "$srcdir"/gocryptfs "$pkgdir"/opt/bin/ 35 | } 36 | -------------------------------------------------------------------------------- /package/innernet/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos2) 6 | pkgnames=(innernet-client) 7 | pkgdesc="A private network system that uses WireGuard under the hood." 8 | url="https://github.com/tonarino/innernet" 9 | pkgver=1.6.1-1 10 | timestamp=2024-01-19T14:24:40Z 11 | section="utils" 12 | maintainer="plan5 <30434574+plan5@users.noreply.github.com>" 13 | license=MIT 14 | installdepends=(wireguard) 15 | makedepends=(build:librust-clang-sys-dev build:libclang-dev build:libc6 build:libc6-dev build:clang) 16 | 17 | image=rust:v3.1 18 | _srcver="v${pkgver%-*}" 19 | source=( 20 | "https://github.com/tonarino/innernet/archive/refs/tags/$_srcver.zip" 21 | ) 22 | sha256sums=( 23 | fd9ec6eb75dcc46c818696e7fcb87eb772dc024e0c326360f0f8c473c937c37c 24 | ) 25 | 26 | prepare() { 27 | # Change config folders to live under /opt 28 | sed -i "s/\/etc\/innernet/\/opt\/etc\/innernet/g" "$srcdir/shared/src/lib.rs" 29 | sed -i "s/\/var\/lib\/innernet/\/opt\/var\/lib\/innernet/g" "$srcdir/shared/src/lib.rs" 30 | 31 | # Change binary path in service file 32 | sed -i "s/\/usr\/bin\/innernet/\/opt\/bin\/innernet/g" "$srcdir/client/innernet@.service" 33 | 34 | #tbd: change wireguard config dir to /opt/etc/wireguard? 35 | #sed -i "s/\/etc\/wireguard/\/opt\/etc\/wireguard/g" "$srcdir/shared/src/lib.rs" 36 | } 37 | 38 | build() { 39 | cargo build --release --bin innernet 40 | } 41 | 42 | package() { 43 | install -D -m 700 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/innernet 44 | install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir/client/innernet@.service" 45 | install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir/client/innernet.target" 46 | } 47 | 48 | configure() { 49 | if ! [ -d /opt/var/lib/innernet ]; then 50 | mkdir -p /opt/var/lib/innernet 51 | fi 52 | } 53 | 54 | preremove() { 55 | disable-unit innernet.target 56 | disable-unit innernet@.service 57 | } 58 | 59 | postremove() { 60 | systemctl daemon-reload 61 | } 62 | -------------------------------------------------------------------------------- /package/kernelctl/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(kernelctl) 6 | pkgdesc="Manage aftermarket kernels" 7 | url=https://toltec-dev.org/ 8 | pkgver=0.2-1 9 | timestamp=2022-11-12T00:00Z 10 | section="utils" 11 | maintainer="Salvatore Stella " 12 | license=MIT 13 | 14 | source=( 15 | kernelctl 16 | ) 17 | sha256sums=( 18 | SKIP 19 | ) 20 | 21 | package() { 22 | install -D -m 744 -t "$pkgdir"/opt/bin "$srcdir"/kernelctl 23 | install -d "$pkgdir"/opt/usr/share/kernelctl 24 | mkdir -p "$pkgdir"/opt/share/toltec/reenable.d 25 | touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" 26 | } 27 | 28 | configure() { 29 | os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) 30 | if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then 31 | echo "Creating a backup of the currently running kernel." 32 | kernelctl backup vanilla 33 | fi 34 | } 35 | 36 | preremove() { 37 | os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) 38 | if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$os_version")" == "" ]]; then 39 | if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then 40 | echo "Unable to restore default kernel." 41 | echo "To force removal, you can run the following:" 42 | echo " opkg remove --force-remove kernelctl" 43 | echo "Warning: This will not leave you in a stock state" 44 | exit 1 45 | else 46 | echo "Restoring default kernel" 47 | kernelctl set default 48 | fi 49 | fi 50 | } 51 | -------------------------------------------------------------------------------- /package/keyd/default.conf: -------------------------------------------------------------------------------- 1 | [ids] 2 | # 2edd:0001 # type folio 3 | 4 | [main] 5 | -------------------------------------------------------------------------------- /package/keyd/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos3) 6 | pkgnames=(keyd) 7 | pkgdesc="A key remapping daemon for linux" 8 | url="https://github.com/rvaiya/keyd" 9 | pkgver=2.4.3-1 10 | timestamp=2023-05-16T10:11Z 11 | section=utils 12 | maintainer="Kai " 13 | license=MIT 14 | 15 | image=base:v3.1 16 | source=( 17 | https://github.com/rvaiya/keyd/archive/refs/tags/v2.4.3.zip 18 | default.conf 19 | ) 20 | sha256sums=( 21 | cdfcc2cf0518b9a2d292ebac17b18f78548b92803e2a9deeb9f18c9641bf80e5 22 | SKIP 23 | ) 24 | 25 | build() { 26 | make PREFIX=/opt CONFIG_DIR=/opt/etc/keyd "CC=${CROSS_COMPILE}cc" 27 | sed -i 's|ExecStart=/usr/bin/keyd|ExecStart=/opt/bin/keyd|' keyd.service 28 | } 29 | 30 | package() { 31 | cd "$srcdir" 32 | make PREFIX=/opt CONFIG_DIR=/opt/etc/keyd DESTDIR="$pkgdir" install 33 | rmdir "$pkgdir"/etc/keyd 34 | install -D -m 644 -t "$pkgdir"/etc/systemd/system "$srcdir"/keyd.service 35 | install -D -m 644 -t "$pkgdir"/opt/etc/keyd "$srcdir"/default.conf 36 | } 37 | 38 | configure() { 39 | addgroup keyd 40 | systemctl daemon-reload 41 | if is-active keyd; then 42 | systemctl restart keyd 43 | elif ! is-enabled "$pkgname.service"; then 44 | echo "" 45 | echo "Run the following command(s) to enable the keyd service" 46 | how-to-enable "$pkgname.service" 47 | echo "" 48 | echo "You will need to modify /opt/etc/keyd/default.conf before starting the service" 49 | fi 50 | } 51 | 52 | preremove() { 53 | disable-unit keyd 54 | delgroup keyd 55 | } 56 | 57 | postremove() { 58 | systemctl daemon-reload 59 | } 60 | -------------------------------------------------------------------------------- /package/keywriter/keywriter.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=keywriter 5 | desc=Markdown-enabled free writing app 6 | call=/opt/bin/keywriter 7 | term=: 8 | -------------------------------------------------------------------------------- /package/keywriter/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(keywriter) 6 | pkgdesc="Markdown-enabled free writing app" 7 | url=https://github.com/dps/remarkable-keywriter 8 | pkgver=0.2~20-gddc9e73-2 9 | timestamp=2022-02-09T07:05:03Z 10 | section="writing" 11 | maintainer="Mattéo Delabre " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=qt:v2.3 17 | _sundown=37728fb2d7137ff7c37d0a474cb827a8d6d846d8 18 | source=( 19 | https://github.com/dps/remarkable-keywriter/archive/ddc9e7321e0a57a014f19b891dc8104e67d2e447.zip 20 | "https://github.com/vmg/sundown/archive/$_sundown.zip" 21 | keywriter.draft 22 | ) 23 | noextract=("$_sundown.zip") 24 | sha256sums=( 25 | aaa22f616b44eb57594c2ec25e3a5461caec1165f6d6760112b898d9bece9135 26 | 3c594d8219b17acd140b7011b44ebc69ab9d68910da827494f8c9cc2f5b12ecf 27 | SKIP 28 | ) 29 | 30 | prepare() { 31 | bsdtar -x \ 32 | --strip-components 1 \ 33 | --directory "$srcdir/sundown" \ 34 | --file "$srcdir/$_sundown.zip" 35 | } 36 | 37 | build() { 38 | sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/' edit.pro 39 | qmake edit.pro 40 | make 41 | } 42 | 43 | package() { 44 | install -D -m 755 "$srcdir"/edit "$pkgdir"/opt/bin/keywriter 45 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/keywriter.draft 46 | } 47 | 48 | configure() { 49 | mkdir -p /home/root/edit 50 | echo "Created /home/root/edit for storing your Markdown files" 51 | } 52 | -------------------------------------------------------------------------------- /package/koreader/KOReader.oxide: -------------------------------------------------------------------------------- 1 | { 2 | "displayName": "KOReader", 3 | "description": "An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats", 4 | "bin": "/opt/bin/koreader", 5 | "icon": "/opt/etc/draft/icons/koreader.png", 6 | "type": "foreground", 7 | "events": { 8 | "pause": "/opt/koreader/fbdepth -d 16 -r 1", 9 | "stop": "/opt/koreader/fbdepth -d 16 -r 1", 10 | "resume": "/opt/koreader/fbdepth -d 8 -r 1" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /package/koreader/koreader: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | LD_PRELOAD=/opt/lib/librm2fb_client.so.1 KO_DONT_GRAB_INPUT=1 exec -a /opt/bin/koreader bash /opt/koreader/koreader.sh 5 | -------------------------------------------------------------------------------- /package/koreader/koreader-toltec.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats 3 | StartLimitIntervalSec=600 4 | StartLimitBurst=4 5 | After=home.mount 6 | OnFailure=xochitl.service 7 | 8 | [Service] 9 | ExecStart=/opt/bin/koreader 10 | Restart=on-failure 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | Alias=launcher.service 15 | -------------------------------------------------------------------------------- /package/koreader/koreader.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=KOReader 5 | desc=An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats 6 | imgFile=koreader 7 | call=/opt/bin/koreader 8 | term=killall -9 luajit 9 | -------------------------------------------------------------------------------- /package/koreader/launcherctl-koreader: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | case "$1" in 4 | is-active) 5 | systemctl is-active --quiet koreader.service 6 | ;; 7 | is-enabled) 8 | systemctl is-enabled --quiet koreader.service 9 | ;; 10 | logs) 11 | if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then 12 | journalctl --follow --all --unit koreader.service 13 | else 14 | journalctl --no-pager --all --unit koreader.service 15 | fi 16 | ;; 17 | start | launch) 18 | systemctl start koreader.service 19 | ;; 20 | stop | close) 21 | systemctl stop koreader.service 22 | ;; 23 | enable) 24 | systemctl enable koreader.service 25 | ;; 26 | disable) 27 | systemctl disable koreader.service 28 | ;; 29 | apps) 30 | echo "koreader" 31 | ;; 32 | running) 33 | if "$0" is-active; then 34 | echo "koreader" 35 | fi 36 | ;; 37 | *) 38 | echo "KOReader does not support this method" 39 | exit 1 40 | ;; 41 | esac 42 | -------------------------------------------------------------------------------- /package/koreader/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(koreader) 6 | pkgdesc="Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats" 7 | url=https://github.com/koreader/koreader 8 | pkgver=2024.11-1 9 | timestamp=2024-11-20T19:52:06Z 10 | section="readers" 11 | maintainer="raisjn " 12 | license=AGPL-3.0-or-later 13 | installdepends=(fbink fbdepth display rm2fb-client) 14 | 15 | _srcver="v${pkgver%-*}" 16 | source=( 17 | "https://github.com/koreader/koreader/releases/download/$_srcver/koreader-remarkable-$_srcver.zip" 18 | koreader.draft 19 | KOReader.oxide 20 | koreader-toltec.service 21 | koreader 22 | launcherctl-koreader 23 | ) 24 | sha256sums=( 25 | 2b97146e38bdfeec483773e01738cd6109fadc06312b41a16328e33ad3eceae5 26 | SKIP 27 | SKIP 28 | SKIP 29 | SKIP 30 | SKIP 31 | ) 32 | 33 | package() { 34 | install -d "$pkgdir"/opt/koreader 35 | cp -R "$srcdir"/* "$pkgdir"/opt/koreader/ 36 | rm "$pkgdir"/opt/koreader/koreader*zip 37 | rm "$pkgdir"/opt/koreader/{fbink,fbdepth} 38 | ln -s /opt/bin/fbink "$pkgdir"/opt/koreader/fbink 39 | ln -s /opt/bin/fbdepth "$pkgdir"/opt/koreader/fbdepth 40 | sed -i 's/hasOTAUpdates = yes/hasOTAUpdates = no/' "$pkgdir"/opt/koreader/frontend/device/remarkable/device.lua 41 | 42 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/ "$srcdir"/koreader.draft 43 | install -D -m 644 -t "$pkgdir"/opt/usr/share/applications/ "$srcdir"/KOReader.oxide 44 | install -D -m 644 "$srcdir"/koreader-toltec.service "$pkgdir"/lib/systemd/system/koreader.service 45 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons/ "$srcdir"/resources/koreader.png 46 | install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/koreader 47 | install -D -T -m 755 "$srcdir"/launcherctl-koreader "$pkgdir"/opt/share/launcherctl/"$pkgname" 48 | } 49 | 50 | configure() { 51 | # This file can cause issues with startup when moving from 2022.08 to another version 52 | if [ -f /opt/koreader/cache/fontlist/fontinfo.dat ]; then 53 | rm /opt/koreader/cache/fontlist/fontinfo.dat 54 | fi 55 | 56 | systemctl daemon-reload 57 | 58 | if ! launcherctl is-current-launcher "$pkgname"; then 59 | echo "" 60 | echo "Run the following command(s) to use $pkgname as your launcher" 61 | echo "launcherctl switch-launcher --start $pkgname" 62 | echo "" 63 | fi 64 | } 65 | 66 | preremove() { 67 | # Just in case more than one launcher is active, do individual checks 68 | if launcherctl is-active-launcher "$pkgname" || launcherctl is-enabled-launcher "$pkgname"; then 69 | launcherctl switch-launcher --start xochitl 70 | fi 71 | } 72 | 73 | postremove() { 74 | systemctl daemon-reload 75 | } 76 | -------------------------------------------------------------------------------- /package/launcherctl/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(launcherctl) 6 | pkgdesc="Manage your installed launcher" 7 | url=https://toltec-dev.org/ 8 | pkgver=0.0.1-3 9 | timestamp=2023-12-18T03:32Z 10 | section="launchers" 11 | maintainer="Eeems " 12 | license=MIT 13 | 14 | source=( 15 | launcherctl 16 | ) 17 | sha256sums=( 18 | SKIP 19 | ) 20 | 21 | package() { 22 | install -D -m 744 -t "$pkgdir"/opt/bin "$srcdir"/launcherctl 23 | install -d "$pkgdir"/opt/share/launcherctl 24 | } 25 | 26 | configure() { 27 | echo "" 28 | echo "You can use launcherctl to manage your active launcher" 29 | echo "" 30 | } 31 | 32 | preremove() { 33 | launcherctl switch-launcher --start xochitl 34 | } 35 | -------------------------------------------------------------------------------- /package/lf/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(lf) 6 | pkgdesc="Terminal file manager" 7 | url=https://github.com/gokcehan/lf 8 | pkgver=r32-1 9 | timestamp=2024-03-31T20:04Z 10 | section="utils" 11 | maintainer="gbyl " 12 | license=MIT 13 | installdepends=(libncurses-dev) 14 | 15 | image=golang:v3.1 16 | source=("https://github.com/gokcehan/lf/archive/refs/tags/${pkgver%-*}.zip") 17 | sha256sums=(571ee17d8181d77a3b8bcd7aaaff0bde062c1851d93e9d324dfe15948136891a) 18 | 19 | build() { 20 | export GOARCH=arm 21 | go build 22 | } 23 | 24 | package() { 25 | install -D -m 755 "$srcdir"/lf "$pkgdir"/opt/bin/lf 26 | } 27 | -------------------------------------------------------------------------------- /package/libdlib/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(libdlib libdlib-dev) 6 | pkgdesc="Toolkit for making machine learning and data analysis applications in C++" 7 | url=http://dlib.net 8 | pkgver=19.21-2 9 | timestamp=2020-08-08T19:41:07Z 10 | section="devel" 11 | maintainer="Mattéo Delabre " 12 | license=BSL-1.0 13 | 14 | image=base:v2.1 15 | source=("https://github.com/davisking/dlib/archive/v${pkgver%-*}.tar.gz") 16 | sha256sums=(116f52e58be04b47dab52057eaad4b5c4d5c3032d927fe23d55b0741fc4107a0) 17 | 18 | build() { 19 | cmake -B build \ 20 | -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ 21 | -DCMAKE_INSTALL_PREFIX="/opt" \ 22 | -DBUILD_SHARED_LIBS=ON 23 | cmake --build build 24 | cmake --build build --target install -- DESTDIR=../install 25 | } 26 | 27 | libdlib() { 28 | package() { 29 | install -d "$pkgdir"/opt/lib "$pkgdir"/usr/lib 30 | cp --no-dereference "$srcdir"/install/opt/lib/lib*.so* "$pkgdir"/opt/lib 31 | 32 | for file in "$pkgdir"/opt/lib/lib*.so*; do 33 | base="${file#"$pkgdir"}" 34 | ln -s "$base" "${file/\/opt/\/usr}" 35 | done 36 | } 37 | } 38 | 39 | libdlib-dev() { 40 | pkgdesc="$pkgdesc - development files" 41 | 42 | package() { 43 | install -d "$pkgdir"/opt/lib 44 | cp -r "$srcdir"/install/opt/lib/pkgconfig "$pkgdir"/opt/lib 45 | cp -r "$srcdir"/install/opt/lib/cmake "$pkgdir"/opt/lib 46 | cp -r "$srcdir"/install/opt/include "$pkgdir"/opt 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /package/libvncserver/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(libvncserver libvncclient libvncserver-dev) 6 | pkgdesc="C libraries for implementing VNC servers or clients" 7 | url=https://libvnc.github.io 8 | pkgver=0.9.13-2 9 | timestamp=2020-06-13T19:19:11Z 10 | section="devel" 11 | maintainer="Mattéo Delabre " 12 | license=GPL-2.0-or-later 13 | 14 | image=base:v2.1 15 | source=("https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${pkgver%-*}.zip") 16 | sha256sums=(d209d70998a9b98f9120eeb82df7a17767796c477eaa8297e0a55856a977c54f) 17 | 18 | build() { 19 | cmake -B build \ 20 | -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ 21 | -DCMAKE_INSTALL_PREFIX="/opt" 22 | cmake --build build 23 | cmake --build build --target install -- DESTDIR=../install 24 | } 25 | 26 | libvncserver() { 27 | pkgdesc="$pkgdesc - server library" 28 | 29 | package() { 30 | install -d "$pkgdir"/opt/lib "$pkgdir"/usr/lib 31 | cp --no-dereference "$srcdir"/install/opt/lib/libvncserver*.so* "$pkgdir"/opt/lib 32 | 33 | for file in "$pkgdir"/opt/lib/lib*.so*; do 34 | base="${file#"$pkgdir"}" 35 | ln -s "$base" "${file/\/opt/\/usr}" 36 | done 37 | } 38 | } 39 | 40 | libvncclient() { 41 | pkgdesc="$pkgdesc - client library" 42 | 43 | package() { 44 | install -d "$pkgdir"/opt/lib "$pkgdir"/usr/lib 45 | cp --no-dereference "$srcdir"/install/opt/lib/libvncclient*.so* "$pkgdir"/opt/lib 46 | 47 | for file in "$pkgdir"/opt/lib/lib*.so*; do 48 | base="${file#"$pkgdir"}" 49 | ln -s "$base" "${file/\/opt/\/usr}" 50 | done 51 | } 52 | } 53 | 54 | libvncserver-dev() { 55 | pkgdesc="$pkgdesc - development files" 56 | 57 | package() { 58 | install -d "$pkgdir"/opt/lib 59 | cp -r "$srcdir"/install/opt/lib/pkgconfig "$pkgdir"/opt/lib 60 | cp -r "$srcdir"/install/opt/include "$pkgdir"/opt 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /package/linux-mainline/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rm2) 6 | pkgnames=(linux-mainline) 7 | pkgdesc="reMarkable 2 kernel based on the mainline kernel" 8 | url=https://www.kernel.org 9 | pkgver=6.3.0-2 10 | timestamp=2023-08-23T21:50:09Z 11 | section=kernel 12 | maintainer="Alistair Francis " 13 | makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev) 14 | installdepends=(kernelctl) 15 | license=GPL-2.0-only 16 | flags=(nostrip) 17 | 18 | image=base:v3.2 19 | source=( 20 | https://github.com/alistair23/linux/archive/1698a3bdd8d66e58873c5bb3ce370b7d48b004cf.tar.gz 21 | remarkable_defconfig 22 | ) 23 | sha256sums=( 24 | 647f6a60adad8c4e37eeaf9114c037888cb33923e364bbf5dc0830b2661c21b7 25 | f4d8cbb2c0e7bff5b151729b45064eb9e95005cb91899f0a9df038343d95ebf2 26 | ) 27 | 28 | build() { 29 | cp remarkable_defconfig arch/arm/configs/ 30 | ARCH=arm make remarkable_defconfig 31 | ARCH=arm make -j8 32 | } 33 | 34 | package() { 35 | # Prepare files for the kernel archive 36 | local staging="$srcdir"/staging 37 | mkdir -p "$staging/boot" 38 | 39 | cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage 40 | cp --no-dereference "$srcdir"/arch/arm/boot/dts/imx7d-remarkable2.dtb \ 41 | "$staging"/boot/zero-sugar.dtb 42 | 43 | ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging" 44 | rm "$staging"/lib/modules/*/{source,build} 45 | 46 | # Create the kernel archive 47 | local archive="mainline-${pkgver%-*}.tar.bz2" 48 | install -d "$pkgdir"/opt/usr/share/kernelctl 49 | (cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \ 50 | -cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*) 51 | } 52 | 53 | configure() { 54 | echo "The new kernel files have been copied, but not installed." 55 | echo "Please use kernelctl to select the kernel to boot." 56 | echo 57 | echo "Known issues with the mainline kernel:" 58 | echo " - No support for low power mode (suspend uses more power then it should)" 59 | echo " - Shutdown doesn't work (https://github.com/alistair23/linux/issues/4)" 60 | echo " - Device doesn't always resume correctly from suspend, a reboot is required" 61 | echo " - Wacom stylus doesn't work in Xochitl (https://github.com/reMarkable/linux/issues/15)" 62 | echo " - No OTG control support" 63 | echo " - Folio does not work" 64 | } 65 | -------------------------------------------------------------------------------- /package/linux-stracciatella/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2022 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rm1 rm2) 6 | pkgnames=(linux-stracciatella) 7 | pkgdesc="RemarkableAS's vanilla kernel with a few extra flakes" 8 | url=https://github.com/Etn40ff/linux-remarkable 9 | pkgver=5.4.70.4-1 10 | timestamp=2023-12-28T22:42:42Z 11 | section="kernel" 12 | maintainer="Salvatore Stella " 13 | makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev build:kmod) 14 | license=GPL-2.0-only 15 | flags=(nostrip) 16 | installdepends=(kernelctl) 17 | image=base:v3.1 18 | _wireguard_version=1.0.20220627 19 | source=( 20 | "https://github.com/Etn40ff/linux-remarkable/archive/refs/tags/${pkgver%-*}.tar.gz" 21 | "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-$_wireguard_version.tar.xz" 22 | ) 23 | sha256sums=( 24 | 29fd9d7adcb243b841d3577088dd2aec6106eaaa3bc51440411f49ea50658c01 25 | 362d412693c8fe82de00283435818d5c5def7f15e2433a07a9fe99d0518f63c0 26 | ) 27 | noextract=("wireguard-linux-compat-$_wireguard_version.tar.xz") 28 | 29 | prepare() { 30 | # Jury-rig the wireguard module into sources and enable it 31 | mkdir "$srcdir/net/wireguard" 32 | bsdtar --strip-components 2 -xJ -C "$srcdir/net/wireguard" \ 33 | -f "$srcdir/wireguard-linux-compat-$_wireguard_version.tar.xz" \ 34 | "wireguard-linux-compat-$_wireguard_version/src" 35 | sed -i "/^obj-\\\$(CONFIG_NETFILTER).*+=/a obj-\$(CONFIG_WIREGUARD) += wireguard/" "$srcdir/net/Makefile" 36 | sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" "$srcdir/net/Kconfig" 37 | echo "CONFIG_WIREGUARD=m" >> "$srcdir/arch/arm/configs/zero-gravitas_defconfig" 38 | echo "CONFIG_WIREGUARD=m" >> "$srcdir/arch/arm/configs/zero-sugar_defconfig" 39 | } 40 | 41 | build() { 42 | if [[ $arch = rm1 ]]; then 43 | ARCH=arm make zero-gravitas_defconfig 44 | elif [[ $arch = rm2 ]]; then 45 | ARCH=arm make zero-sugar_defconfig 46 | fi 47 | ARCH=arm make -j8 48 | } 49 | 50 | package() { 51 | # Prepare files for the kernel archive 52 | local staging="$srcdir"/staging 53 | mkdir -p "$staging/boot" 54 | 55 | cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage 56 | if [[ $arch = rm1 ]]; then 57 | cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-gravitas.dtb "$staging"/boot/zero-gravitas.dtb 58 | elif [[ $arch = rm2 ]]; then 59 | cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-sugar.dtb "$staging"/boot/zero-sugar.dtb 60 | fi 61 | 62 | ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging" 63 | rm "$staging"/lib/modules/*/{source,build} 64 | 65 | # Create the kernel archive 66 | local archive="stracciatella-${pkgver%-*}.tar.bz2" 67 | install -d "$pkgdir"/opt/usr/share/kernelctl 68 | (cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \ 69 | -cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*) 70 | } 71 | 72 | configure() { 73 | if [[ $(< /etc/version) -le 20210709090000 ]]; then 74 | echo "WARNING: Your system is too old; this kernel will most likely not work unless you add the appropriate firmware blobs to /lib/firmware." 75 | echo "Please consider updating your system instead." 76 | fi 77 | echo "The new kernel files have been copied, but not installed." 78 | echo "Please use kernelctl to select the kernel to boot." 79 | } 80 | -------------------------------------------------------------------------------- /package/micro/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(micro) 6 | pkgdesc="Modern and intuitive terminal-based text editor" 7 | url=https://micro-editor.github.io/ 8 | pkgver=2.0.14-1 9 | timestamp=2024-08-27T18:13:07Z 10 | section="utils" 11 | maintainer="Eeems " 12 | license=MIT 13 | 14 | source=("https://github.com/zyedidia/micro/releases/download/v2.0.14/micro-2.0.14-linux-arm.tar.gz") 15 | sha256sums=(9f490d88bd30a548af99a905f50244dc6c80f3c7a3c6f98faeb5b0a7329f7dea) 16 | 17 | package() { 18 | install -Dm644 "$srcdir"/LICENSE "$pkgdir/opt/usr/share/licenses/$pkgname/LICENSE" 19 | install -Dm644 "$srcdir"/LICENSE-THIRD-PARTY "$pkgdir/opt/usr/share/licenses/$pkgname/LICENSE-THIRD-PARTY" 20 | install -Dm644 "$srcdir"/micro.1 "$pkgdir/opt/share/man/man1/micro.1" 21 | install -Dm744 "$srcdir"/micro "$pkgdir/opt/bin/micro" 22 | } 23 | -------------------------------------------------------------------------------- /package/mmc-utils/0001-Makefile-Remove-Werror.patch: -------------------------------------------------------------------------------- 1 | From 898bae517a42c1bf088e1c7b2bd34cd1fb086d22 Mon Sep 17 00:00:00 2001 2 | From: Alistair Francis 3 | Date: Wed, 3 Nov 2021 22:23:46 +1000 4 | Subject: [PATCH] Makefile: Remove -Werror 5 | 6 | Signed-off-by: Alistair Francis 7 | --- 8 | Makefile | 6 ++---- 9 | 1 file changed, 2 insertions(+), 4 deletions(-) 10 | 11 | diff --git a/Makefile b/Makefile 12 | index aa27ff2..3402007 100644 13 | --- a/Makefile 14 | +++ b/Makefile 15 | @@ -8,11 +8,9 @@ objects = \ 16 | 3rdparty/hmac_sha/hmac_sha2.o \ 17 | 3rdparty/hmac_sha/sha2.o 18 | 19 | -CHECKFLAGS = -Wall -Werror -Wuninitialized -Wundef 20 | - 21 | DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@ 22 | 23 | -override CFLAGS := $(CHECKFLAGS) $(AM_CFLAGS) $(CFLAGS) 24 | +override CFLAGS := $(AM_CFLAGS) $(CFLAGS) 25 | 26 | INSTALL = install 27 | prefix ?= /usr/local 28 | @@ -24,7 +22,7 @@ progs = mmc 29 | 30 | # make C=1 to enable sparse 31 | ifdef C 32 | - check = sparse $(CHECKFLAGS) 33 | + check = sparse 34 | endif 35 | 36 | all: $(progs) manpages 37 | -- 38 | 2.31.1 39 | 40 | -------------------------------------------------------------------------------- /package/mmc-utils/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmall) 6 | pkgnames=(mmc-utils) 7 | pkgdesc="A tool for monitoring the eMMC protocol" 8 | url=https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/ 9 | pkgver=1.0-1 10 | timestamp=2021-08-12T19:41:07Z 11 | section="devel" 12 | maintainer="Alistair Francis " 13 | license=GPL-2.0-only 14 | 15 | image=base:v2.2 16 | source=( 17 | 0001-Makefile-Remove-Werror.patch 18 | ) 19 | sha256sums=( 20 | SKIP 21 | ) 22 | _commit=7769a4d7abe339ce273c13a203394a79a11fcff9 23 | 24 | prepare() { 25 | cd "$srcdir" 26 | mkdir mmc-utils 27 | cd mmc-utils 28 | git init 29 | git fetch --depth=1 "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git" "$_commit" 30 | git checkout -f "$_commit" 31 | patch < "$srcdir"/0001-Makefile-Remove-Werror.patch 32 | } 33 | 34 | build() { 35 | # Use our toolchain 36 | export AR=arm-linux-gnueabihf-ar 37 | export CC=arm-linux-gnueabihf-gcc 38 | export STRIP=arm-linux-gnueabihf-strip 39 | 40 | make -C "$srcdir"/mmc-utils -j4 41 | } 42 | 43 | package() { 44 | DESTDIR="$pkgdir" make -C "$srcdir"/mmc-utils install 45 | } 46 | -------------------------------------------------------------------------------- /package/move-logs-to-opt/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(move-logs-to-opt) 6 | pkgdesc="Move log files to /opt to save space on the root partition" 7 | url=https://github.com/toltec-dev/toltec 8 | pkgver=0.0.1-1 9 | timestamp=2024-01-07T23:55Z 10 | section="utils" 11 | maintainer="Eeems " 12 | license=MIT 13 | 14 | source=(var-log.mount) 15 | sha256sums=(SKIP) 16 | 17 | package() { 18 | mkdir -p "$pkgdir"/opt/var/log 19 | install -D -m 644 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/var-log.mount 20 | } 21 | 22 | configure() { 23 | systemctl daemon-reload 24 | if is-active systemd-journald.service; then 25 | journalctl --sync --flush 26 | systemctl stop systemd-journald.service 27 | fi 28 | if ! mountpoint -q /var/log; then 29 | echo "Moving log files to new location" 30 | local target_path=/home/root/.entware/var/log 31 | mkdir -p "$target_path" 32 | cp -af "/var/log/." "$target_path" 33 | rm -rf "/var/log/"* 34 | fi 35 | if ! is-enabled "var-log.mount"; then 36 | systemctl enable "var-log.mount" 37 | fi 38 | systemctl restart "var-log.mount" 39 | systemctl start systemd-journald.service 40 | } 41 | 42 | preremove() { 43 | if is-active systemd-journald.service; then 44 | journalctl --sync --flush 45 | systemctl stop systemd-journald.service 46 | fi 47 | disable-unit "var-log.mount" 48 | } 49 | 50 | postremove() { 51 | systemctl daemon-reload 52 | systemctl start systemd-journald.service 53 | if mountpoint -q /var/log; then 54 | umount -l /var/log 55 | fi 56 | } 57 | -------------------------------------------------------------------------------- /package/move-logs-to-opt/var-log.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Bind mount '/home/root/.entware/var/log' over '/var/log' 3 | DefaultDependencies=no 4 | Conflicts=umount.target 5 | Before=local-fs.target umount.target systemd-journald.service 6 | After=home.mount 7 | 8 | [Mount] 9 | What=/home/root/.entware/var/log 10 | Where=/var/log 11 | Type=none 12 | Options=bind 13 | 14 | [Install] 15 | WantedBy=local-fs.target 16 | -------------------------------------------------------------------------------- /package/neofetch/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(neofetch) 6 | pkgdesc="A command-line system information tool" 7 | url="https://github.com/rM-self-serve/neofetch-rM" 8 | pkgver=1.1.1-1 9 | timestamp=2024-03-14T11:43:00Z 10 | section="utils" 11 | maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" 12 | license=MIT 13 | 14 | source=( 15 | "$url"/archive/6dfc7a7b0c10f451bdd8a09813ab6dea01ef6be2.zip 16 | ) 17 | 18 | sha256sums=( 19 | 798ddbcb196b382e6bb70b3da08bc0e745c8b6da0bfe4ea5cd66653d383e5b1d 20 | ) 21 | 22 | package() { 23 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/neofetch 24 | } 25 | 26 | configure() { 27 | if [ -f '/home/root/.config/neofetch/config.conf' ]; then 28 | echo "" 29 | echo "You may choose to remove ~/.config/neofetch/config.conf" 30 | echo "in order to get the latest default config." 31 | fi 32 | } 33 | -------------------------------------------------------------------------------- /package/netevent/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(netevent) 6 | pkgdesc="Input-Event device cloning utility" 7 | url="https://github.com/Blub/netevent" 8 | pkgver=2.2.2-1 9 | timestamp=2023-04-29T14:21:02Z 10 | section=utils 11 | maintainer="Salvatore Stella " 12 | license=GPL-2.0-only 13 | 14 | image=base:v2.2 15 | source=( 16 | "https://github.com/Blub/netevent/archive/refs/tags/${pkgver%-*}.tar.gz" 17 | ) 18 | sha256sums=( 19 | 09c0e97cd5c2cf5ed51e44ce955cc28cfa2cd0022bd48241f1096bc441439d3a 20 | ) 21 | 22 | build() { 23 | export CXX="${CROSS_COMPILE}g++" 24 | make 25 | } 26 | 27 | package() { 28 | install -D -m 755 "$srcdir"/netevent "$pkgdir"/opt/bin/netevent 29 | } 30 | -------------------------------------------------------------------------------- /package/netsurf/netsurf.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=NetSurf 5 | desc=a lightweight web browser 6 | call=/opt/bin/netsurf 7 | term=killall -9 netsurf 8 | -------------------------------------------------------------------------------- /package/netsurf/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(netsurf) 6 | pkgdesc="Lightweight web browser" 7 | url=https://github.com/alex0809/netsurf-reMarkable 8 | pkgver=0.4.0-3 9 | timestamp=2021-05-31T11:15+00:00 10 | maintainer="Alex Friesenhahn " 11 | archs=(rmall) 12 | license=GPL-2.0-or-later 13 | section="readers" 14 | makedepends=( 15 | build:automake 16 | build:bison 17 | build:flex 18 | build:git 19 | build:gperf 20 | build:libpng-dev 21 | build:libtool 22 | ) 23 | installdepends=( 24 | display 25 | dejavu-fonts-ttf-DejaVuSans 26 | dejavu-fonts-ttf-DejaVuSans-Bold 27 | dejavu-fonts-ttf-DejaVuSans-BoldOblique 28 | dejavu-fonts-ttf-DejaVuSans-Oblique 29 | dejavu-fonts-ttf-DejaVuSerif 30 | dejavu-fonts-ttf-DejaVuSerif-Bold 31 | dejavu-fonts-ttf-DejaVuSerif-Italic 32 | dejavu-fonts-ttf-DejaVuSansMono 33 | dejavu-fonts-ttf-DejaVuSansMono-Bold 34 | ) 35 | image=base:v2.1 36 | flags=(patch_rm2fb) 37 | 38 | source=( 39 | https://github.com/alex0809/netsurf-reMarkable/archive/refs/tags/v0.4.tar.gz 40 | netsurf.draft 41 | ) 42 | sha256sums=( 43 | a688ffc634fbbab463f92153b048e643fa6a5a1f92c492ff2005079a73a8de90 44 | SKIP 45 | ) 46 | 47 | build() { 48 | ln -s /usr/bin/which /bin 49 | scripts/install_dependencies.sh 50 | TARGET_WORKSPACE=$(pwd)/build scripts/build.sh 51 | } 52 | 53 | package() { 54 | # Netsurf binary 55 | install -d "$pkgdir"/opt/bin 56 | install -D -m 755 "$srcdir"/build/netsurf/nsfb "$pkgdir"/opt/bin/netsurf 57 | 58 | # Draft launcher file 59 | install -d "$pkgdir"/opt/etc/draft 60 | install -D -m 644 "$srcdir"/netsurf.draft "$pkgdir"/opt/etc/draft/ 61 | 62 | # Resources 63 | install -d "$pkgdir"/opt/usr/share/netsurf 64 | resdir="$srcdir"/build/netsurf/frontends/framebuffer/res 65 | install -D -m 644 -t "$pkgdir"/opt/usr/share/netsurf/ \ 66 | "$resdir"/adblock.css \ 67 | "$resdir"/default.css \ 68 | "$resdir"/quirks.css \ 69 | "$resdir"/internal.css \ 70 | "$resdir"/Messages \ 71 | "$resdir"/credits.html \ 72 | "$resdir"/licence.html \ 73 | "$resdir"/welcome.html \ 74 | "$resdir"/welcome-netsurf.html \ 75 | "$resdir"/netsurf.png 76 | 77 | # Default Choices file 78 | install -D -m 644 "$srcdir"/example/Choices "$pkgdir"/opt/usr/share/netsurf/Choices 79 | } 80 | -------------------------------------------------------------------------------- /package/open-remarkable-shutdown/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos2 rm1os3) 6 | pkgnames=(open-remarkable-shutdown) 7 | pkgdesc="Use remarkable-splash to display shutdown and reboot images" 8 | url=https://github.com/ddvk/remarkable-splash 9 | pkgver=1.0-3 10 | timestamp=2022-02-28T00:12Z 11 | section="utils" 12 | maintainer="Eeems " 13 | license=MIT 14 | installdepends=(remarkable-splash) 15 | 16 | source=( 17 | remarkable-shutdown-override.conf 18 | remarkable-reboot-override.conf 19 | ) 20 | sha256sums=( 21 | SKIP 22 | SKIP 23 | ) 24 | 25 | package() { 26 | install -D -m 644 -t "$pkgdir"/etc/systemd/system/remarkable-shutdown.service.d "$srcdir"/remarkable-shutdown-override.conf 27 | install -D -m 644 -t "$pkgdir"/etc/systemd/system/remarkable-reboot.service.d "$srcdir"/remarkable-reboot-override.conf 28 | } 29 | 30 | configure() { 31 | systemctl daemon-reload 32 | } 33 | 34 | postremove() { 35 | systemctl daemon-reload 36 | } 37 | -------------------------------------------------------------------------------- /package/open-remarkable-shutdown/remarkable-reboot-override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart= 3 | ExecStart=-/opt/bin/remarkable-splash /usr/share/remarkable/rebooting.png 4 | -------------------------------------------------------------------------------- /package/open-remarkable-shutdown/remarkable-shutdown-override.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart= 3 | ExecStart=-/opt/bin/remarkable-splash 4 | -------------------------------------------------------------------------------- /package/oxide/launcherctl-oxide: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | case "$1" in 4 | is-active) 5 | systemctl is-active --quiet tarnish.service 6 | ;; 7 | is-enabled) 8 | systemctl is-enabled --quiet tarnish.service 9 | ;; 10 | logs) 11 | if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then 12 | journalctl --follow --all --unit tarnish.service 13 | else 14 | journalctl --no-pager --all --unit tarnish.service 15 | fi 16 | ;; 17 | start) 18 | systemctl start tarnish.service 19 | ;; 20 | stop) 21 | systemctl stop tarnish.service 22 | ;; 23 | enable) 24 | systemctl enable tarnish.service 25 | ;; 26 | disable) 27 | systemctl disable tarnish.service 28 | ;; 29 | apps) 30 | rot apps get applications | jq -r 'keys | .[]' 31 | ;; 32 | running) 33 | rot apps get runningApplications | jq -r 'keys | .[]' 34 | ;; 35 | paused) 36 | rot apps get pausedApplications | jq -r 'keys | .[]' 37 | ;; 38 | launch | resume) 39 | rot apps get applications \ 40 | | jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \ 41 | | xargs -I {} rot --object Application:{} apps call launch 42 | ;; 43 | close) 44 | rot apps get applications \ 45 | | jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \ 46 | | xargs -I {} rot --object Application:{} apps call stop 47 | ;; 48 | pause) 49 | rot apps get applications \ 50 | | jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \ 51 | | xargs -I {} rot --object Application:{} apps call pause 52 | ;; 53 | *) 54 | echo "Oxide does not support this method" 55 | exit 1 56 | ;; 57 | esac 58 | -------------------------------------------------------------------------------- /package/oxide/toltec-rm2-override.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | [Unit] 5 | After=rm2fb.service 6 | Requires=rm2fb.service 7 | OnFailure=xochitl.service 8 | -------------------------------------------------------------------------------- /package/puzzles/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(puzzles) 6 | timestamp=2021-03-04T14:03-08:00 7 | maintainer="Mattéo Delabre " 8 | _ver=0.2.4 9 | pkgver=${_ver}-4 10 | license=MIT 11 | pkgdesc="Simon Tatham's Puzzle Package" 12 | url="https://github.com/mrichards42/remarkable_puzzles" 13 | section="games" 14 | makedepends=(build:git) 15 | flags=(patch_rm2fb) 16 | 17 | image=python:v2.3.2 18 | source=( 19 | "https://github.com/mrichards42/remarkable_puzzles/releases/download/v${pkgver%-*}/puzzles-source.tar.gz" 20 | puzzles.draft 21 | ) 22 | sha256sums=( 23 | ae00474f6b1f7ced13bd6b1f18ff57b583fcd66c587a5180e87af997768345ff 24 | SKIP 25 | ) 26 | 27 | build() { 28 | pip3 install okp 29 | 30 | # do the build 31 | make puzzles ARCH=rm BUILD=release RMP_VERSION="${_ver}" 32 | } 33 | 34 | package() { 35 | install -d "$pkgdir"/opt/etc/{draft,puzzles,puzzles/save} 36 | install -D -m 755 "$srcdir"/build/release/puzzles "$pkgdir"/opt/bin/puzzles 37 | install -D -m 644 "$srcdir"/puzzles.draft "$pkgdir"/opt/etc/draft/ 38 | install -D -m 644 "$srcdir"/config/* -t "$pkgdir"/opt/etc/puzzles/config/ 39 | install -D -m 644 "$srcdir"/help/* -t "$pkgdir"/opt/etc/puzzles/help/ 40 | install -D -m 644 "$srcdir"/icons/* -t "$pkgdir"/opt/etc/puzzles/icons/ 41 | } 42 | -------------------------------------------------------------------------------- /package/puzzles/puzzles.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 - 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=Puzzles 5 | desc=A portable puzzle pack ported to the rM 6 | call=/opt/bin/puzzles 7 | -------------------------------------------------------------------------------- /package/puzzles/toltec.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/config.cpp b/src/config.cpp 2 | index ab69543..41d2543 100644 3 | --- a/src/config.cpp 4 | +++ b/src/config.cpp 5 | @@ -4,6 +4,7 @@ 6 | #include 7 | #include 8 | #include 9 | +#include 10 | #include 11 | #include 12 | 13 | @@ -15,6 +16,8 @@ 14 | #include "puzzles.hpp" 15 | #include "paths.hpp" 16 | 17 | +using namespace std; 18 | + 19 | struct Parser { 20 | Config * cfg; 21 | std::map color_order; 22 | -------------------------------------------------------------------------------- /package/quickjs/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(quickjs) 6 | pkgdesc="A small and embeddable Javascript engine" 7 | url=https://bellard.org/quickjs/ 8 | pkgver=2024.01.13-1 9 | section="devel" 10 | timestamp=2024-01-13T00:00Z 11 | maintainer="khanhas " 12 | license=MIT 13 | 14 | image=base:v3.1 15 | source=( 16 | https://bellard.org/quickjs/quickjs-2024-01-13.tar.xz 17 | ) 18 | sha256sums=( 19 | 3c4bf8f895bfa54beb486c8d1218112771ecfc5ac3be1036851ef41568212e03 20 | ) 21 | 22 | build() { 23 | make CROSS_PREFIX="$CROSS_COMPILE" qjs qjscalc 24 | } 25 | 26 | package() { 27 | install -d "$pkgdir"/opt/bin 28 | install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/qjs 29 | ln -s qjs "$pkgdir"/opt/bin/qjscalc 30 | } 31 | -------------------------------------------------------------------------------- /package/reboot-guard/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(reboot-guard) 6 | pkgdesc="Block systemd-initiated poweroff/reboot/halt until configurable condition checks pass" 7 | url=https://github.com/stephanritscher/reboot-guard 8 | pkgver=1.0.1-8 9 | timestamp=2020-05-04T06:16Z 10 | section="devel" 11 | maintainer="Eeems " 12 | license=GPL-3.0 13 | installdepends=(xochitl python3) 14 | 15 | source=( 16 | https://github.com/stephanritscher/reboot-guard/archive/34d5df49d9fb914ab74d9b85d726aaa503b972a9.zip 17 | rguard.service 18 | rguard.patch 19 | ) 20 | sha256sums=( 21 | b0a0af690d26dee6f00d03a0ed7573097bc06b867de5f7eef2222e8e6b9d3584 22 | SKIP 23 | SKIP 24 | ) 25 | 26 | package() { 27 | patch "$srcdir"/rguard < "$srcdir"/rguard.patch 28 | install -D -m 644 "$srcdir"/rguard.service "$pkgdir"/etc/systemd/system/rguard.service 29 | install -D -m 755 "$srcdir"/rguard "$pkgdir"/opt/bin/rguard 30 | } 31 | 32 | configure() { 33 | systemctl daemon-reload 34 | } 35 | 36 | preremove() { 37 | disable-unit rguard.service 38 | } 39 | 40 | postremove() { 41 | systemctl daemon-reload 42 | } 43 | -------------------------------------------------------------------------------- /package/reboot-guard/rguard.patch: -------------------------------------------------------------------------------- 1 | --- rguard 2020-10-10 17:56:32.947843536 -0600 2 | +++ rguard.new 2020-10-10 17:57:18.981358842 -0600 3 | @@ -1,4 +1,4 @@ 4 | -#!/usr/bin/env python3 5 | +#!/opt/bin/python3 6 | # -*- coding: utf-8 -*- 7 | # Copyright 2015, 2017 Ryan Sawhill Aroha 8 | # 9 | -------------------------------------------------------------------------------- /package/reboot-guard/rguard.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Reboot Guard 3 | 4 | [Service] 5 | # With the following default example, shutdown will ALWAYS be blocked 6 | # This is because the "false" command will never succeed 7 | # In this case, shutdown can only be unblocked by manually stopping/killing rguard.service 8 | ExecStart=/opt/bin/rguard --run false --interval 86400 9 | # 10 | # NOTE: The following ExecStart lines are EXAMPLES only; modify to suit your needs 11 | # There should be only ONE uncommented ExecStart line 12 | 13 | ##ExecStart=/opt/bin/rguard --interval 30 --require-file /run/.allow-shutdown 14 | ##ExecStart=/opt/bin/rguard --ignore-signals --unit atd -u crond --cmd mysqld 15 | ##ExecStart=/opt/bin/rguard --cmd gnome-session --forbid-file '/some/lock file' 16 | ##ExecStart=/opt/bin/rguard --run 'ping -c2 -w1 -W1 www.redhat.com' 17 | ##ExecStart=/opt/bin/rguard --loglevel info --run '!findmnt /mountpoint' 18 | ##ExecStart=/opt/bin/rguard --loglevel debug --run '!@lsof -i:ssh | grep -q ESTABLISHED' 19 | # 20 | # Keep in mind: 21 | # * --loglevel is optional (defaults to warning; use info or debug to see more detail) 22 | # * --ignore-signals is optional (without it, `systemctl stop rguard` or `killall rguard` will remove the blocks) 23 | # * --interval is optional (defaults to 60 secs; useful to bump up when testing) 24 | # * Condition-checking options can be used more than once 25 | # * Any arguments with spaces should be double- or single-quoted 26 | # * If passing a shell command to --run, prefix with "@" 27 | # * To invert the interpretation of --run, prefix with "!" 28 | # * If using both "@" and "!", order should be "!@" 29 | # * See rguard --help for more detail 30 | # 31 | TimeoutStopSec=5 32 | # Optionally uncomment the following line to prevent systemd from killing rguard 33 | ##SendSIGKILL=no 34 | 35 | [Install] 36 | WantedBy=multi-user.target 37 | -------------------------------------------------------------------------------- /package/recrossable/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(recrossable) 6 | pkgdesc="Solve crossword puzzles" 7 | url=https://github.com/sandsmark/recrossable 8 | pkgver=0.0.0-8 9 | timestamp=2021-01-15T12:58:22Z 10 | section="games" 11 | maintainer="Mattéo Delabre " 12 | license=GPL-2.0-or-later 13 | installdepends=(libdlib display) 14 | makedepends=(build:imagemagick build:librsvg2-bin host:libdlib host:libdlib-dev) 15 | flags=(patch_rm2fb) 16 | 17 | image=qt:v2.1 18 | source=( 19 | https://github.com/sandsmark/recrossable/archive/234d5744c0b20087a588d0ecead0a9f58c1f323d.zip 20 | recrossable.draft 21 | recrossable.svg 22 | ) 23 | sha256sums=( 24 | 24b7512d295df504583ccdde7307e8f59fc561da638b992902b4ebccc412fa92 25 | SKIP 26 | SKIP 27 | ) 28 | 29 | build() { 30 | cat << QMAKE >> recrossable.pro 31 | linux-arm-remarkable-g++ { 32 | LIBS += -lqsgepaper 33 | DEFINES += REMARKABLE_DEVICE 34 | 35 | CONFIG += link_pkgconfig 36 | PKGCONFIG += dlib-1 37 | } 38 | QMAKE 39 | 40 | qmake 41 | make 42 | convert +set date:create +set date:modify recrossable.{svg,png} 43 | } 44 | 45 | package() { 46 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/recrossable 47 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/recrossable.draft 48 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/recrossable.png 49 | } 50 | -------------------------------------------------------------------------------- /package/recrossable/recrossable.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=recrossable 5 | desc=Solve crossword puzzles 6 | call=/opt/bin/recrossable 7 | term=: 8 | imgFile=recrossable 9 | -------------------------------------------------------------------------------- /package/recrossable/recrossable.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | image/svg+xml 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | O 21 | N 22 | E 23 | A 24 | D 25 | 26 | 27 | -------------------------------------------------------------------------------- /package/regenda/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(regenda) 6 | pkgdesc="Caldav agenda app" 7 | url=https://github.com/tenJirka/reGenda 8 | pkgver=0.0.2-2 9 | timestamp=2023-09-06T06:45Z 10 | section="utils" 11 | maintainer="tenJirka " 12 | license=GPL3 13 | makedepends=(build:python3-venv) 14 | installdepends=(python3 python3-lxml python3-pytz python3-yaml python3-requests python3-dateutil python3-six python3-urllib3 python3-idna simple) 15 | flags=(patch_rm2fb) 16 | source=(https://github.com/tenJirka/reGenda/archive/refs/tags/0.0.2.zip) 17 | sha256sums=(4f51de514945f9cfc6a1852181baab4bb0f4daadb222e8ddb05929f17e2044d9) 18 | image=python 19 | 20 | build() { 21 | python3 -m venv venv 22 | # shellcheck disable=SC1091 23 | source venv/bin/activate 24 | mkdir "$srcdir"/python_modules 25 | pip install caldav rm_pysas -t "$srcdir"/python_modules 26 | } 27 | 28 | package() { 29 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/ "$srcdir"/regenda.draft 30 | install -D -m 644 -t "$pkgdir"/opt/etc/reGenda/ "$srcdir"/config.yml.example 31 | install -D -m 644 "$srcdir"/icon.png "$pkgdir"/opt/etc/draft/icons/reGenda.png 32 | install -D -m 755 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/run.py 33 | install -D -m 644 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/languages.py 34 | install -D -m 644 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/calendar_caldav.py 35 | mkdir "$pkgdir"/opt/bin/ 36 | ln -s /opt/usr/lib/reGenda/run.py "$pkgdir"/opt/bin/reGenda 37 | cp -r "$srcdir"/python_modules/caldav* "$pkgdir"/opt/usr/lib/reGenda/ 38 | cp -r "$srcdir"/python_modules/icalendar* "$pkgdir"/opt/usr/lib/reGenda/ 39 | cp -r "$srcdir"/python_modules/rm_pySAS* "$pkgdir"/opt/usr/lib/reGenda/ 40 | cp -r "$srcdir"/python_modules/recurring_ical_events* "$pkgdir"/opt/usr/lib/reGenda/ 41 | cp -r "$srcdir"/python_modules/tzlocal* "$pkgdir"/opt/usr/lib/reGenda/ 42 | cp -r "$srcdir"/python_modules/vobject* "$pkgdir"/opt/usr/lib/reGenda/ 43 | cp -r "$srcdir"/python_modules/x_wr_timezone* "$pkgdir"/opt/usr/lib/reGenda/ 44 | } 45 | 46 | configure() { 47 | if [ ! -f /opt/etc/reGenda/config.yml ]; then 48 | cp /opt/etc/reGenda/config.yml.example /opt/etc/reGenda/config.yml 49 | echo -e "\033[33mYou have to config server in /opt/etc/reGenda/config.yml, see https://github.com/tenJirka/reGenda for help.\033[0;39m" 50 | fi 51 | } 52 | 53 | postremove() { 54 | rm -f /opt/usr/lib/reGenda/**/*.cpython-*.pyc 55 | } 56 | -------------------------------------------------------------------------------- /package/remarkable-splash/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(remarkable-splash) 6 | pkgdesc="Show splashscreens + remarkable-shutdown replacement that does not clear the screen" 7 | url=https://github.com/ddvk/remarkable-splash 8 | pkgver=1.0-5 9 | timestamp=2019-12-31T10:07Z 10 | section="utils" 11 | maintainer="Eeems " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=qt:v2.1 17 | source=(https://github.com/ddvk/remarkable-splash/archive/e6e0b1e1f3604ab99fb7b476cd290b19c5644025.zip) 18 | sha256sums=(4aa3988707f9b66752ec9ec2f407cce2ac6e433ae7f06affea9f26957d206b4a) 19 | 20 | build() { 21 | qmake 22 | make 23 | } 24 | 25 | package() { 26 | install -D -m 755 "$srcdir"/remarkable-splash "$pkgdir"/opt/bin/remarkable-splash 27 | } 28 | -------------------------------------------------------------------------------- /package/remarkable-stylus/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos2) 6 | pkgnames=(remarkable-stylus) 7 | pkgver=0.0.3-3 8 | pkgdesc="Generate a key press upon pressing the button of a Lamy AL-star EMR pen" 9 | timestamp=2020-11-19T20:07:29Z 10 | maintainer="Eeems " 11 | license=LGPL-3.0 12 | url=https://github.com/ddvk/remarkable-stylus 13 | section="utils" 14 | installdepends=(xochitl ddvk-hacks) 15 | 16 | image=qt:v2.1 17 | source=( 18 | "https://github.com/ddvk/remarkable-stylus/archive/refs/tags/0.0.3.tar.gz" 19 | remarkable-stylus.env 20 | ) 21 | sha256sums=( 22 | 1328ff351e079ff9fd1fa83f0b686af4a51f3f5fb0bb36ae1646d5ddb87423a2 23 | SKIP 24 | ) 25 | 26 | build() { 27 | qmake 28 | make 29 | } 30 | 31 | package() { 32 | install -D -m 755 -t "$pkgdir"/usr/lib/plugins/generic "$srcdir"/libqevdevlamyplugin.so 33 | install -D -m 644 -t "$pkgdir"/opt/etc/xochitl.env.d "$srcdir"/remarkable-stylus.env 34 | } 35 | -------------------------------------------------------------------------------- /package/remarkable-stylus/remarkable-stylus.env: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | # Please do not modify files shipped by Toltec, or they risk being 4 | # overwritten with updates. Instead create your own files in this directory. 5 | export QT_QPA_GENERIC_PLUGINS=evdevlamy 6 | -------------------------------------------------------------------------------- /package/restream/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(restream) 6 | pkgdesc="Binary framebuffer capture tool for the reStream script" 7 | url=https://github.com/rien/reStream 8 | pkgver=1.2.0-1 9 | timestamp=2021-11-04T19:09:14Z 10 | section="screensharing" 11 | maintainer="Dan Shick " 12 | license=MIT 13 | 14 | image=rust:v2.1 15 | source=("https://github.com/rien/reStream/archive/refs/tags/${pkgver%-*}.tar.gz") 16 | sha256sums=(4166142b15e1e7363dac302aa92aad5b44e0514cab233abecb51414952c1d5a1) 17 | 18 | build() { 19 | cargo build --release --bin restream 20 | } 21 | 22 | package() { 23 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/restream 24 | } 25 | 26 | configure() { 27 | cat << 'MSG' 28 | 29 | This app is only the device-side half of reStream. The companion script for 30 | consuming the output of this app can be found at 31 | . 32 | 33 | MSG 34 | } 35 | -------------------------------------------------------------------------------- /package/reterm/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | pkgnames=(reterm) 5 | pkgdesc="Landscape terminal support for the Remarkable 2 + type cover" 6 | section="admin" 7 | pkgver="20230628.1927-2" 8 | timestamp="2023-06-28T19:28:06Z" 9 | maintainer="Eeems " 10 | url="https://github.com/i-am-shodan/ReTerm" 11 | license=MIT 12 | _gitcommit="5730f56cf25642b9752fb9d7987a40f6af6b5f59" 13 | source=(https://github.com/i-am-shodan/ReTerm/archive/refs/tags/release_20230628_1927.tar.gz) 14 | sha256sums=(3a6db39cfb83606c4ac5153fe2ac0319ab5c8322c73172178534c047a15c635b) 15 | image=dotnet6:latest 16 | makedepends=(build:gawk build:git) 17 | 18 | prepare() { 19 | cd "$srcdir" 20 | git config --global --add safe.directory /src 21 | git init 22 | git remote add origin https://github.com/i-am-shodan/ReTerm.git 23 | git fetch --depth=1 origin "$_gitcommit" 24 | git checkout -f "$_gitcommit" 25 | git submodule update --init --force 26 | } 27 | 28 | build() { 29 | dotnet publish \ 30 | -r linux-arm \ 31 | --self-contained true \ 32 | -p:PublishSingleFile=true \ 33 | -p:PublishedTrimmed=true \ 34 | -p:PublishReadyToRun=true \ 35 | -p:Configuration=Release \ 36 | -p:PublishReadyToRunShowWarnings=true \ 37 | src/ReTerm/ReTerm.csproj 38 | } 39 | 40 | package() { 41 | local pubdir 42 | pubdir="$srcdir"/src/ReTerm/bin/Release/net6.0/linux-arm/publish 43 | install -D -m 755 -t "$pkgdir"/opt/usr/lib/reterm "$pubdir"/ReTerm 44 | install -D -m 755 -T "$pubdir"/ReTerm.sh "$pkgdir"/opt/bin/ReTerm 45 | sed -i 's|/home/root/ReTerm/ReTerm|/opt/usr/lib/reterm/ReTerm|' "$pkgdir"/opt/bin/ReTerm 46 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/draft/reterm.draft 47 | sed -i 's|/home/root/ReTerm/ReTerm.sh|/opt/bin/ReTerm|' "$pkgdir"/opt/etc/draft/reterm.draft 48 | sed -i 's|killall -9 dotnet|killall ReTerm|' "$pkgdir"/opt/etc/draft/reterm.draft 49 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/draft/reterm.png 50 | install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/oxide/reterm.oxide 51 | } 52 | -------------------------------------------------------------------------------- /package/retris/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(retris) 6 | pkgdesc="Tetris game" 7 | url=https://github.com/LinusCDE/retris 8 | pkgver=0.6.3-4 9 | timestamp=2021-01-30T02:41Z 10 | section="games" 11 | maintainer="Linus K. " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=rust:v2.1 17 | source=(https://github.com/LinusCDE/retris/archive/0.6.3-1.zip) 18 | sha256sums=(ecc7215098c03e79cd92b1835626e6739a5a932d5aa709899d183347e2a4108e) 19 | 20 | build() { 21 | # Fall back to system-wide config 22 | rm .cargo/config 23 | cargo build --release 24 | } 25 | 26 | package() { 27 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/retris 28 | install -D -m 644 "$srcdir"/oxide "$pkgdir"/opt/etc/draft/retris 29 | install -D -m 644 "$srcdir"/icon.png "$pkgdir"/opt/etc/draft/icons/retris.png 30 | } 31 | -------------------------------------------------------------------------------- /package/rm2-suspend-fix/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rm2) 6 | pkgnames=(rm2-suspend-fix) 7 | pkgdesc="Fix issue where suspend breaks networking on the reMarkable 2" 8 | url=https://toltec-dev.org/ 9 | pkgver=0.0.0-3 10 | timestamp=2021-01-04T22:40Z 11 | section="utils" 12 | maintainer="Eeems " 13 | license=MIT 14 | 15 | source=(rm2-suspend-fix.sh) 16 | sha256sums=(SKIP) 17 | 18 | package() { 19 | install -D -m 744 -t "$pkgdir"/lib/systemd/system-sleep/ "$srcdir"/rm2-suspend-fix.sh 20 | } 21 | -------------------------------------------------------------------------------- /package/rm2-suspend-fix/rm2-suspend-fix.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Inspired by https://blog.christophersmart.com/2016/05/11/running-scripts-before-and-after-suspend-with-systemd/comment-page-1/ 3 | 4 | if [[ "${1}" == "pre" ]]; then 5 | rmmod brcmfmac 6 | elif [[ "${1}" == "post" ]]; then 7 | modprobe brcmfmac 8 | fi 9 | -------------------------------------------------------------------------------- /package/rmfakecloud-proxy/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(rmfakecloud-proxy) 6 | pkgdesc="Connect Xochitl to a rmfakecloud server" 7 | _url=https://github.com/ddvk/rmfakecloud-proxy 8 | url="$_url" 9 | _upver=0.0.3 10 | pkgver="$_upver-5" 11 | timestamp=2022-02-26T22:59Z 12 | section="utils" 13 | maintainer="Mattéo Delabre " 14 | license=MIT 15 | installdepends=(procps-ng-pgrep findutils) 16 | 17 | image=golang:v2.2 18 | source=( 19 | "https://github.com/ddvk/rmfakecloud-proxy/archive/v$_upver.zip" 20 | rmfakecloudctl 21 | rmfakecloud-proxy.service 22 | ) 23 | sha256sums=( 24 | eaa3fdcce250e23f368a4c9ddcfb99ff178decf31b2a7f84501dfc6fdb2e6d8f 25 | SKIP 26 | SKIP 27 | ) 28 | 29 | build() { 30 | eval "$(go env)" 31 | cat > version.go << GO 32 | package main 33 | const Version = "rmfakecloud-proxy ${_upver%-*} ($GOOS-$GOARCH) $GOVERSION\n$_url" 34 | GO 35 | 36 | GOARCH=arm GOARM=7 go build -ldflags="-w -s" -o dist/rmfakecloud-proxy 37 | } 38 | 39 | package() { 40 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/dist/rmfakecloud-proxy 41 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/rmfakecloudctl 42 | install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/rmfakecloud-proxy.service 43 | } 44 | 45 | configure() { 46 | # shellcheck source=rmfakecloudctl 47 | source /opt/bin/rmfakecloudctl 48 | systemctl daemon-reload 49 | 50 | # Sync the proxy state to the value of its configuration flag 51 | if is-enabled; then 52 | # This branch is reached when upgrading the package 53 | install-certificates 54 | systemctl enable --now rmfakecloud-proxy 55 | install-hosts 56 | else 57 | uninstall-certificates 58 | disable-unit rmfakecloud-proxy.service 59 | uninstall-hosts 60 | fi 61 | 62 | rmfakecloudctl status 63 | } 64 | 65 | preremove() { 66 | rmfakecloudctl disable 67 | } 68 | 69 | postremove() { 70 | systemctl daemon-reload 71 | } 72 | -------------------------------------------------------------------------------- /package/rmfakecloud-proxy/rmfakecloud-proxy.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=rmfakecloud reverse proxy 3 | Documentation=https://github.com/ddvk/rmfakecloud-proxy 4 | After=home.mount network.target 5 | Before=xochitl.service launcher.service 6 | ConditionPathExists=/opt/etc/rmfakecloud-proxy/enabled 7 | ConditionPathExists=/opt/etc/rmfakecloud-proxy/config 8 | 9 | [Service] 10 | Environment=HOME=/home/root 11 | ExecStart=/opt/bin/rmfakecloud-proxy -c /opt/etc/rmfakecloud-proxy/config 12 | Restart=on-failure 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /package/rmfm/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(rmfm) 6 | pkgdesc="Bare-bones file manager using Node.js and sas" 7 | url="https://forgejo.sny.sh/sun/rmFM" 8 | pkgver=1.5.1-1 9 | timestamp=2023-12-06T08:51:41+01:00 10 | section=utils 11 | maintainer="Sunny " 12 | license=Unlicense 13 | installdepends=(node simple) 14 | 15 | source=( 16 | https://forgejo.sny.sh/sun/rmFM/archive/1.5.1.zip 17 | path_fix.patch 18 | ) 19 | sha256sums=( 20 | 054569a5e1f420b9046ee2c4067749a1e0bccd88acc216e485b9665a42f4dd60 21 | SKIP 22 | ) 23 | 24 | prepare() { 25 | # Assume node to be in /opt/bin 26 | # This is a temporary fix for not working in remux 27 | patch -d "$srcdir" < "$srcdir"/path_fix.patch 28 | } 29 | 30 | package() { 31 | install -D -m 755 "$srcdir"/rmfm "$pkgdir"/opt/bin/rmfm 32 | install -D -m 644 "$srcdir"/rmfm.draft "$pkgdir"/opt/etc/draft/rmfm.draft 33 | install -D -m 644 "$srcdir"/rmfm.png "$pkgdir"/opt/etc/draft/icons/rmfm.png 34 | } 35 | -------------------------------------------------------------------------------- /package/rmfm/path_fix.patch: -------------------------------------------------------------------------------- 1 | diff --git a/rmfm b/rmfm 2 | index 63eeb98..b28dbd0 100755 3 | --- a/rmfm 4 | +++ b/rmfm 5 | @@ -1 +1 @@ 6 | -#!/usr/bin/env node 7 | +#!/opt/bin/node 8 | -------------------------------------------------------------------------------- /package/rmkit/genie.service: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | [Unit] 5 | Description=Gesture launcher 6 | After=opt.mount 7 | StartLimitInterval=30 8 | StartLimitBurst=5 9 | 10 | [Service] 11 | ExecStart=/opt/bin/genie /opt/etc/genie.conf 12 | Restart=on-failure 13 | RestartSec=5 14 | Environment="HOME=/home/root" 15 | Environment="PATH=/opt/bin:/opt/sbin:/opt/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" 16 | 17 | 18 | [Install] 19 | WantedBy=multi-user.target 20 | -------------------------------------------------------------------------------- /package/rmkit/remux.service: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | [Unit] 5 | Description=App launcher that supports multi-tasking applications 6 | After=xochitl.service opt.mount 7 | StartLimitInterval=30 8 | StartLimitBurst=5 9 | Conflicts=draft.service tarnish.service 10 | 11 | [Service] 12 | ExecStart=/opt/bin/remux 13 | Restart=on-failure 14 | RestartSec=5 15 | Environment="HOME=/home/root" 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /package/rmservewacominput/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(rmservewacominput) 6 | pkgdesc="Serve pen input on port 33333" 7 | url=https://github.com/LinusCDE/rmWacomToMouse 8 | pkgver=0.3.0-2 9 | timestamp=2021-03-10T18:36Z 10 | section="utils" 11 | maintainer="Linus K. " 12 | license=MIT 13 | installdepends=(appmarkable) 14 | 15 | image=base:v2.1 16 | source=( 17 | https://github.com/LinusCDE/rmWacomToMouse/archive/fd1c5454b65f456f6e890b99109e50a8f576dad1.zip 18 | rmservewacominput.draft 19 | rmservewacominput-gui 20 | ) 21 | sha256sums=( 22 | c2c15b519a8352a5b52e1b15154e4024acc423552c6cf7559c23fcb8beffcd56 23 | SKIP 24 | SKIP 25 | ) 26 | 27 | build() { 28 | cd c_implementation 29 | CC=arm-linux-gnueabihf-gcc make 30 | } 31 | 32 | package() { 33 | install -D -m 755 "$srcdir"/c_implementation/rmServeWacomInput "$pkgdir"/opt/bin/rmservewacominput 34 | install -D -m 755 "$srcdir"/rmservewacominput-gui "$pkgdir"/opt/bin/rmservewacominput-gui 35 | install -D -m 644 "$srcdir"/rmservewacominput.draft "$pkgdir"/opt/etc/draft/rmservewacominput.draft 36 | install -D -m 644 "$srcdir"/icon.png "$pkgdir"/opt/etc/draft/icons/rmservewacominput.png 37 | } 38 | -------------------------------------------------------------------------------- /package/rmservewacominput/rmservewacominput-gui: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2021 The Toltec Contributors 4 | # SPDX-License-Identifier: MIT 5 | 6 | exec /opt/bin/appmarkable /opt/bin/rmservewacominput -n rmServeWacomInput -i /opt/etc/draft/icons/rmservewacominput.png 7 | -------------------------------------------------------------------------------- /package/rmservewacominput/rmservewacominput.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=rmServeWacomInput 5 | desc=Open a server on port 33333 and serve pen input 6 | call=/opt/bin/rmservewacominput-gui 7 | term=: 8 | imgFile=rmservewacominput 9 | -------------------------------------------------------------------------------- /package/signature-rm/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos2 rmallos3) 6 | pkgnames=("signature-rm") 7 | pkgdesc="Remove the signature from the bottom of emails" 8 | url="https://github.com/rM-self-serve/signature-rM" 9 | pkgver=1.0.2-3 10 | timestamp=2023-12-06T11:43:00Z 11 | section="utils" 12 | maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" 13 | license=MIT 14 | image=rust:v3.1 15 | conflicts=(webinterface-onboot) 16 | conflicts_rmallos2=(ddvk-hacks) 17 | 18 | source=( 19 | "$url"/archive/b5561af4eb6a0f5aa6e98e1a1279066f0c4bd9b7.zip 20 | ) 21 | sha256sums=( 22 | 1a7cc8bf7a3f5a7cc9a10ca968bbb5a0082a065760f4cb7038fdb6b9aed4bb00 23 | ) 24 | 25 | build() { 26 | cargo build --release 27 | } 28 | 29 | package() { 30 | install -D -m 755 -t "$pkgdir"/opt/bin \ 31 | "$srcdir/target/armv7-unknown-linux-gnueabihf/release/$pkgname" 32 | 33 | mkdir -p "$pkgdir"/opt/share/toltec/reenable.d 34 | touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" 35 | } 36 | 37 | configure() { 38 | echo 39 | echo "Applying signature-rM" 40 | signature-rm apply -y > /dev/null 41 | echo "Success" 42 | echo 43 | } 44 | 45 | _restore() { 46 | echo "Reverting /usr/bin/xochitl" 47 | if signature-rm has-backup > /dev/null; then 48 | signature-rm revert --backup -y > /dev/null 49 | else 50 | signature-rm revert --reverse -y > /dev/null 51 | fi 52 | echo "Success" 53 | echo 54 | } 55 | 56 | preremove() { 57 | _restore 58 | } 59 | 60 | preupgrade() { 61 | _restore 62 | } 63 | -------------------------------------------------------------------------------- /package/sill/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(sill) 6 | pkgdesc="Gesture-based text editor (and shell) for the reMarkable tablet" 7 | url=https://github.com/bkirwi/sill 8 | pkgver=0.1.1-1 9 | section="writing" 10 | timestamp=2023-08-12T00:00Z 11 | maintainer="Kai " 12 | license="Apache-2.0" 13 | 14 | image=rust:v3.0 15 | source=( 16 | https://github.com/bkirwi/sill/archive/refs/tags/v0.1.1.tar.gz 17 | sill.draft 18 | ) 19 | sha256sums=( 20 | ed3ef2f7ff37101db16f7020e6af86da6c32e78d76247c91a1676b72ce87e3df 21 | SKIP 22 | ) 23 | 24 | build() { 25 | cargo build --release 26 | } 27 | 28 | package() { 29 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/sill 30 | install -D -m 644 "$srcdir"/sill.draft "$pkgdir"/opt/etc/draft/sill.draft 31 | } 32 | -------------------------------------------------------------------------------- /package/sill/sill.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=Sill 5 | desc= Gesture-based text editor (and shell) for the reMarkable tablet 6 | call=/opt/bin/sill 7 | term=: 8 | -------------------------------------------------------------------------------- /package/splashcreens-wavy-lines/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=( 6 | splashscreen-starting-wavey-lines 7 | splashscreen-suspended-wavey-lines 8 | ) 9 | url=https://github.com/EnglishLFC/reMarkable 10 | pkgver=0.0.0-1 11 | timestamp=2021-03-19T18:46:40Z 12 | section="splashscreens" 13 | maintainer="Eeems " 14 | license=BSD-2-Clause 15 | installdepends=(changescrn) 16 | 17 | source=("https://github.com/EnglishLFC/reMarkable/archive/a06b10ea9f28c784e6941085a30944c0489450f4.zip") 18 | sha256sums=(ec5f0321342bf6b48bb1431f4b1cf4416c37681879b3ec6c9375f889077a0b7f) 19 | 20 | splashscreen-starting-wavey-lines() { 21 | pkgdesc="Barnsley Fern battery empty splashscreen" 22 | replaces=("splashscreen-starting") 23 | conflicts=("splashscreen-starting") 24 | package() { 25 | install -D -m 755 -T "$srcdir"/splash/splash.png \ 26 | "$pkgdir"/opt/share/remarkable/splashscreens/starting.png 27 | } 28 | configure() { 29 | changescrn -c starting /opt/share/remarkable/splashscreens/starting.png 30 | } 31 | postremove() { 32 | changescrn -r starting 33 | } 34 | } 35 | 36 | splashscreen-suspended-wavey-lines() { 37 | pkgdesc="Barnsley Fern power off splashscreen" 38 | replaces=("splashscreen-suspended") 39 | conflicts=("splashscreen-suspended") 40 | package() { 41 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ 42 | "$srcdir"/splash/suspended.png 43 | } 44 | configure() { 45 | changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png 46 | } 47 | postremove() { 48 | changescrn -r suspended 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /package/splashscreens-1094/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=( 6 | splashscreen-poweroff-gallifreyan 7 | splashscreen-suspended-gallifreyan 8 | splashscreen-suspended-gallifreyan-dark 9 | splashscreen-starting-gallifreyan 10 | splashscreen-suspended-gallifreyan-2 11 | splashscreen-suspended-flower-pause 12 | ) 13 | url=https://github.com/1094/rM-customizations 14 | pkgver=0.0.0-1 15 | timestamp=2023-05-15T11:27:58Z 16 | section="splashscreens" 17 | maintainer="Eeems " 18 | license=CC-BY-NC-3.0 19 | installdepends=(changescrn) 20 | 21 | source=("https://github.com/1094/rM-customizations/archive/623171a1268e9ff45a8669fa36637e3eabd4ca40.zip") 22 | sha256sums=(8cc8d02fe04c12bacfc798c1f6737cb55f581f191e2bf54147256df265318a31) 23 | 24 | splashscreen-poweroff-gallifreyan() { 25 | pkgdesc="Gallifreyan poweroff splashscreen" 26 | replaces=("splashscreen-poweroff") 27 | conflicts=("splashscreen-poweroff") 28 | package() { 29 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ 30 | "$srcdir"/splash-screens/gallifreyan/poweroff.png 31 | } 32 | configure() { 33 | changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png 34 | } 35 | postremove() { 36 | changescrn -r poweroff 37 | } 38 | } 39 | 40 | splashscreen-suspended-gallifreyan() { 41 | pkgdesc="Gallifreyan suspended splashscreen" 42 | replaces=("splashscreen-suspended") 43 | conflicts=("splashscreen-suspended") 44 | package() { 45 | install -D -m 755 -T "$srcdir"/splash-screens/gallifreyan/sleeping-v1.png \ 46 | "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png 47 | } 48 | configure() { 49 | changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png 50 | } 51 | postremove() { 52 | changescrn -r suspended 53 | } 54 | } 55 | 56 | splashscreen-suspended-gallifreyan-dark() { 57 | pkgdesc="Gallifreyan dark suspended splashscreen" 58 | replaces=("splashscreen-suspended") 59 | conflicts=("splashscreen-suspended") 60 | package() { 61 | install -D -m 755 -T "$srcdir"/splash-screens/gallifreyan/sleeping-v3.png \ 62 | "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png 63 | } 64 | configure() { 65 | changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png 66 | } 67 | postremove() { 68 | changescrn -r suspended 69 | } 70 | } 71 | 72 | splashscreen-starting-gallifreyan() { 73 | pkgdesc="Gallifreyan starting splashscreen" 74 | replaces=("splashscreen-starting") 75 | conflicts=("splashscreen-starting") 76 | package() { 77 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ 78 | "$srcdir"/splash-screens/gallifreyan/starting.png 79 | } 80 | configure() { 81 | changescrn -c starting /opt/share/remarkable/splashscreens/starting.png 82 | } 83 | postremove() { 84 | changescrn -r starting 85 | } 86 | } 87 | 88 | splashscreen-suspended-gallifreyan-2() { 89 | pkgdesc="Gallifreyan suspended splashscreen" 90 | replaces=("splashscreen-suspended") 91 | conflicts=("splashscreen-suspended") 92 | package() { 93 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ 94 | "$srcdir"/splash-screens/gallifreyan/suspended.png 95 | } 96 | configure() { 97 | changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png 98 | } 99 | postremove() { 100 | changescrn -r suspended 101 | } 102 | } 103 | 104 | splashscreen-suspended-flower-pause() { 105 | pkgdesc="Flower suspended splashscreen" 106 | replaces=("splashscreen-suspended") 107 | conflicts=("splashscreen-suspended") 108 | package() { 109 | install -D -m 755 -T "$srcdir"/splash-screens/misc/flower-pause.png \ 110 | "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png 111 | } 112 | configure() { 113 | changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png 114 | } 115 | postremove() { 116 | changescrn -r suspended 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /package/sudoku/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 HookedBehemoth 3 | # SPDX-License-Identifier: GPL-3.0-only 4 | 5 | pkgnames=(sudoku) 6 | pkgdesc="Sudoku for Remarkable" 7 | url="https://github.com/HookedBehemoth/remarkable-sudoku" 8 | pkgver=0.1.2-1 9 | timestamp=2023-02-04T22:49Z 10 | section="games" 11 | maintainer="Luis S. " 12 | license=GPL-3.0-only 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=rust:v3.1 17 | source=("https://github.com/HookedBehemoth/remarkable-sudoku/archive/refs/tags/v${pkgver%-*}.tar.gz") 18 | sha256sums=(08a801a6ffc3f328fc92c8aebadbcc7a123b1abebf5cbe276d5f9f52058ee864) 19 | 20 | build() { 21 | cargo build --release 22 | } 23 | 24 | package() { 25 | install -D -m 755 -t "$pkgdir"/opt/bin \ 26 | "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/sudoku 27 | install -D -m 644 -t "$pkgdir"/opt/etc/draft \ 28 | "$srcdir"/sudoku.draft 29 | install -D -m 644 -T "$srcdir"/res/702.png "$pkgdir"/opt/etc/draft/icons/sudoku.png 30 | install -D -m 644 -t "$pkgdir"/opt/usr/share/applications \ 31 | "$srcdir"/sudoku.oxide 32 | install -D -m 644 -T "$srcdir"/res/702.png "$pkgdir"/opt/usr/share/icons/oxide/702x702/sudoku.png 33 | install -D -m 644 -T "$srcdir"/res/48.png "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps/sudoku.png 34 | } 35 | -------------------------------------------------------------------------------- /package/sysfs_preload/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(sysfs_preload) 6 | pkgdesc="A simple preload that forces any calls to /sys/power/state to use systemd instead." 7 | url="https://github.com/Eeems-Org/sysfs_preload" 8 | pkgver=1.0.3-1 9 | timestamp=2024-10-11T04:33:10Z 10 | section=utils 11 | maintainer="Eeems " 12 | license=MIT 13 | 14 | image=qt:v3.1 15 | source=(https://github.com/Eeems-Org/sysfs_preload/archive/refs/tags/1.0.3.tar.gz) 16 | sha256sums=(06a4c356e583614880c24afc2205caa3db445e3e6bd4414091545540d841a095) 17 | 18 | build() { 19 | find . -name "*.pro" -type f -print0 \ 20 | | xargs -r -0 sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/g' 21 | qmake 22 | make -j"$(nproc)" 23 | INSTALL_ROOT="dist" make install 24 | } 25 | 26 | package() { 27 | cp -ar "${srcdir}/dist/." "${pkgdir}" 28 | } 29 | -------------------------------------------------------------------------------- /package/tailscale-systemd/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(tailscale-systemd) 6 | pkgdesc="SystemD configuration for tailscale" 7 | url=https://tailscale.com 8 | pkgver=0.0.0-2 9 | section="utils" 10 | timestamp=2023-07-12T00:00Z 11 | maintainer="Kai " 12 | license="BSD 3-Clause" 13 | installdepends=(tailscale) 14 | 15 | source=( 16 | tailscaled.service 17 | ) 18 | sha256sums=( 19 | SKIP 20 | ) 21 | 22 | package() { 23 | install -D -m 644 -t "$pkgdir"/etc/systemd/system "$srcdir"/tailscaled.service 24 | } 25 | 26 | configure() { 27 | systemctl daemon-reload 28 | systemctl enable tailscaled 29 | systemctl start tailscaled 30 | } 31 | 32 | preremove() { 33 | disable-unit "tailscaled.service" 34 | } 35 | 36 | postremove() { 37 | systemctl daemon-reload 38 | } 39 | -------------------------------------------------------------------------------- /package/tailscale-systemd/tailscaled.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Tailscale node agent 3 | Documentation=https://tailscale.com/kb/ 4 | Wants=network-pre.target 5 | After=network-pre.target 6 | 7 | [Service] 8 | Environment="HOME=/home/root" 9 | ExecStartPre=/opt/bin/tailscaled --cleanup 10 | ExecStart=/opt/bin/tailscaled --state=/opt/var/lib/tailscale/tailscaled.state --socket=/opt/var/run/tailscale/tailscaled.sock --tun=userspace-networking --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055 11 | ExecStopPost=/opt/bin/tailscaled --cleanup 12 | 13 | Restart=on-failure 14 | 15 | RuntimeDirectory=tailscale 16 | RuntimeDirectoryMode=0755 17 | StateDirectory=tailscale 18 | StateDirectoryMode=0700 19 | CacheDirectory=tailscale 20 | CacheDirectoryMode=0750 21 | Type=notify 22 | 23 | [Install] 24 | WantedBy=multi-user.target 25 | -------------------------------------------------------------------------------- /package/template-cartesian-graph/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(template-cartesian-graph) 6 | pkgdesc="Cartesian graph template" 7 | url=https://github.com/PeterGrace/template-cartesian-graph 8 | pkgver=1.0.0-4 9 | timestamp=2021-01-14T17:46Z 10 | section="templates" 11 | maintainer="Peter Grace " 12 | license=MIT 13 | installdepends=(templatectl) 14 | 15 | source=("https://github.com/PeterGrace/template-cartesian-graph/archive/v${pkgver%-*}.zip") 16 | sha256sums=(d3215546c6fd709bb5988b7042ce5fb990d9a030d783ed7505fcc2dbedbc0e0f) 17 | 18 | package() { 19 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 20 | "$srcdir"/template-cartesian-graph.png 21 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 22 | "$srcdir"/template-cartesian-graph.svg 23 | } 24 | 25 | configure() { 26 | templatectl add --name "Cartesian Graph" --filename "template-cartesian-graph" \ 27 | --category "Custom" --category "Math" 28 | } 29 | 30 | preremove() { 31 | templatectl remove --name "Cartesian Graph" 32 | } 33 | -------------------------------------------------------------------------------- /package/template-noso-grid/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2022 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(template-noso-grid) 6 | pkgdesc="Nosometric grid template" 7 | url=https://github.com/RobotCaleb/noso_template 8 | pkgver=1.0.0 9 | timestamp=2022-03-20T18:34Z 10 | section="templates" 11 | maintainer="Caleb Anderson " 12 | license=MIT 13 | installdepends=(templatectl) 14 | 15 | source=("https://github.com/RobotCaleb/noso_template/archive/refs/tags/v${pkgver%-*}.zip") 16 | sha256sums=(cd7cfcb0c2e9b9734a5e79c00182a4d27858e2c6e2501da54f4d58569171a734) 17 | 18 | package() { 19 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 20 | "$srcdir"/templates/cube-high/noso-cube-high.png 21 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 22 | "$srcdir"/templates/cube-high/noso-cube-high.svg 23 | 24 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 25 | "$srcdir"/templates/cube-low/noso-cube-low.png 26 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 27 | "$srcdir"/templates/cube-low/noso-cube-low.svg 28 | 29 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 30 | "$srcdir"/templates/cube-mid/noso-cube-mid.png 31 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 32 | "$srcdir"/templates/cube-mid/noso-cube-mid.svg 33 | 34 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 35 | "$srcdir"/templates/tall-high/noso-tall-high.png 36 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 37 | "$srcdir"/templates/tall-high/noso-tall-high.svg 38 | 39 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 40 | "$srcdir"/templates/tall-low/noso-tall-low.png 41 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 42 | "$srcdir"/templates/tall-low/noso-tall-low.svg 43 | 44 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 45 | "$srcdir"/templates/tall-mid/noso-tall-mid.png 46 | install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ 47 | "$srcdir"/templates/tall-mid/noso-tall-mid.svg 48 | } 49 | 50 | configure() { 51 | templatectl add -n "Noso Cube Low Density" -f "noso-cube-low.png" \ 52 | -c "Custom" -c "Grids" 53 | templatectl add -n "Noso Cube Mid Density" -f "noso-cube-mid.png" \ 54 | -c "Custom" -c "Grids" 55 | templatectl add -n "Noso Cube High Density" -f "noso-cube-high.png" \ 56 | -c "Custom" -c "Grids" 57 | templatectl add -n "Noso Tall Low Density" -f "noso-tall-low.png" \ 58 | -c "Custom" -c "Grids" 59 | templatectl add -n "Noso Tall Mid Density" -f "noso-tall-mid.png" \ 60 | -c "Custom" -c "Grids" 61 | templatectl add -n "Noso Tall High Density" -f "noso-tall-high.png" \ 62 | -c "Custom" -c "Grids" 63 | } 64 | 65 | preremove() { 66 | templatectl remove --name "Noso Cube Low Density" 67 | templatectl remove --name "Noso Cube Mid Density" 68 | templatectl remove --name "Noso Cube High Density" 69 | templatectl remove --name "Noso Tall Low Density" 70 | templatectl remove --name "Noso Tall Mid Density" 71 | templatectl remove --name "Noso Tall High Density" 72 | } 73 | -------------------------------------------------------------------------------- /package/templatectl/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(templatectl) 6 | pkgdesc="Tool to add/remove templates for xochitl" 7 | url=https://github.com/PeterGrace/templatectl 8 | pkgver=0.1.3-5 9 | timestamp=2021-01-15T01:23Z 10 | section="templates" 11 | maintainer="Peter Grace " 12 | license=MIT 13 | 14 | image=rust:v2.1 15 | source=("https://github.com/PeterGrace/templatectl/archive/v${pkgver%-*}.zip") 16 | sha256sums=(1ac1049c7db4f87c113dbc96372f8f4e2b8bd4c60252e3c4f7c1fafb5ee61ae4) 17 | 18 | build() { 19 | cargo build --release 20 | } 21 | 22 | package() { 23 | install -D -m 755 -t "$pkgdir"/opt/bin \ 24 | "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/templatectl 25 | mkdir -p "$pkgdir"/opt/share/toltec/reenable.d 26 | touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" 27 | } 28 | 29 | preinstall() { 30 | local target_path=share/remarkable/templates 31 | if [ ! -d /home/root/.entware/"$target_path" ]; then 32 | mkdir -p /home/root/.entware/"$target_path" 33 | cp -r /usr/"$target_path"/* /home/root/.entware/"$target_path" 34 | fi 35 | } 36 | 37 | configure() { 38 | add-bind-mount /home/root/.entware/share/remarkable/templates \ 39 | /usr/share/remarkable/templates 40 | 41 | echo "If you perform a system upgrade that adds new templates" 42 | echo "Manual intervention may be required to handle adding the new templates" 43 | } 44 | 45 | postremove() { 46 | local bind_path 47 | local unit_name 48 | local unit_path 49 | bind_path=/usr/share/remarkable/templates 50 | unit_name="$(systemd-escape --path "$bind_path").mount" 51 | unit_path="/lib/systemd/system/$unit_name" 52 | if [[ -e $unit_path ]]; then 53 | remove-bind-mount "$bind_path" 54 | fi 55 | 56 | echo "To fully remove templatectl you'll need to run the following command:" 57 | echo " rm -rf /home/root/.entware/share/remarkable/templates" 58 | } 59 | -------------------------------------------------------------------------------- /package/tilem/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(tilem) 6 | pkgdesc="TI-84+ calculator emulator" 7 | url=https://github.com/timower/rM2-stuff/tree/master/apps/tilem 8 | _tag=0.1.2 9 | pkgver=${_tag}-1 10 | timestamp=2024-05-29T17:05:56Z 11 | maintainer="Mattéo Delabre " 12 | license=GPL-3.0 13 | section="utils" 14 | image=base:v3.1 15 | installdepends=(display) 16 | flags=(nostrip) 17 | 18 | source=() 19 | sha256sums=() 20 | 21 | prepare() { 22 | cd "$srcdir" 23 | mkdir -p tilem 24 | cd tilem 25 | git init 26 | git lfs install 27 | git remote add origin https://github.com/timower/rM2-stuff.git 28 | git fetch --depth 1 origin tag v${_tag} --no-tags 29 | git checkout v${_tag} 30 | git lfs fetch 31 | git lfs checkout 32 | } 33 | 34 | build() { 35 | cd "$srcdir" 36 | mkdir install 37 | cd tilem 38 | cmake --preset release-toltec 39 | cmake \ 40 | --build build/release-toltec \ 41 | --target tilem 42 | cmake \ 43 | --install build/release-toltec \ 44 | --prefix ../install \ 45 | --component tilem \ 46 | --strip 47 | } 48 | 49 | package() { 50 | cp -r "$srcdir/install/." "$pkgdir" 51 | } 52 | -------------------------------------------------------------------------------- /package/toltec-base/opt-usr-bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PATH=/opt/usr/bin:$PATH 4 | -------------------------------------------------------------------------------- /package/toltec-base/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmall rmallos2 rmallos3 rm1 rm1os2 rm1os3 rm2 rm2os2 rm2os3) 6 | pkgnames=(toltec-base) 7 | pkgdesc="Metapackage defining the base set of packages in a Toltec install" 8 | url=https://toltec-dev.org/ 9 | pkgver=1.4-2 10 | timestamp=2023-12-27T08:30Z 11 | section="utils" 12 | maintainer="Eeems " 13 | license=MIT 14 | installdepends=(toltec-bootstrap toltec-deletions toltec-completion launcherctl wget-ssl ca-certificates entware-rc) 15 | installdepends_rm1os2=(open-remarkable-shutdown) 16 | installdepends_rm1os3=(open-remarkable-shutdown) 17 | installdepends_rm2os2=(rm2-suspend-fix) 18 | installdepends_rm2os3=(rm2-suspend-fix) 19 | 20 | source=(opt-usr-bin.sh) 21 | sha256sums=(SKIP) 22 | 23 | package() { 24 | install -D -m 755 -t "$pkgdir"/etc/profile.d/ "$srcdir"/opt-usr-bin.sh 25 | } 26 | 27 | configure() { 28 | ln -sf /opt/etc/profile /etc/profile.d/toltec.sh 29 | # shellcheck disable=SC2016 30 | sed -i \ 31 | -e 's|^export TERM=xterm|if \[ -z "$TERM" \];then export TERM=xterm;fi|' \ 32 | /opt/etc/profile 33 | echo "Disabling automatic update" 34 | disable-unit update-engine.service 35 | case "$arch" in 36 | rmall | rmallos2 | rmallos3) 37 | echo "Warning: rmall version of toltec-base should not be installed" 38 | echo "Please run opkg install --force-reinstall toltec-base" 39 | ;; 40 | rm1 | rm1os2 | rm1os3) 41 | if ! is-masked sys-subsystem-net-devices-usb1.device; then 42 | systemctl mask sys-subsystem-net-devices-usb1.device 43 | fi 44 | if ! is-masked busybox-ifplugd@usb1.service; then 45 | systemctl mask busybox-ifplugd@usb1.service 46 | fi 47 | ;; 48 | rm2 | rm2os2 | rm2os3) 49 | if is-masked sys-subsystem-net-devices-usb1.device; then 50 | systemctl unmask sys-subsystem-net-devices-usb1.device 51 | fi 52 | if is-masked busybox-ifplugd@usb1.service; then 53 | systemctl unmask busybox-ifplugd@usb1.service 54 | fi 55 | ;; 56 | esac 57 | } 58 | 59 | postremove() { 60 | if is-masked sys-subsystem-net-devices-usb1.device; then 61 | systemctl unmask sys-subsystem-net-devices-usb1.device 62 | fi 63 | if is-masked busybox-ifplugd@usb1.service; then 64 | systemctl unmask busybox-ifplugd@usb1.service 65 | fi 66 | if ! is-enabled update-engine.service; then 67 | systemctl enable update-engine 68 | fi 69 | } 70 | -------------------------------------------------------------------------------- /package/toltec-bootstrap/15-systemd-input.rules: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | # This rule makes systemd track input devices as `.device` units, so that 5 | # other services can declare a dependency on them. 6 | ACTION=="add", SUBSYSTEM=="input", TAG+="systemd" 7 | -------------------------------------------------------------------------------- /package/toltec-bootstrap/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(toltec-bootstrap) 6 | pkgdesc="Manage your Toltec install" 7 | url=https://toltec-dev.org/ 8 | pkgver=0.4.5-1 9 | timestamp=2024-05-31T19:13Z 10 | section="utils" 11 | maintainer="Eeems " 12 | license=MIT 13 | # NOTE: The following dependencies will NOT be honored during bootstrap 14 | # and will only be available after the install is completed 15 | # TODO: toltec-base is now installed by default for new users. It is listed 16 | # below as a transitional dependency to ensure that it gets installed for 17 | # existing users (see toltec-dev/toltec#532 for context). This dependency 18 | # should be removed once the package has reached enough users 19 | installdepends=(coreutils-tsort toltec-base) 20 | 21 | source=( 22 | toltecctl 23 | 15-systemd-input.rules 24 | ) 25 | sha256sums=( 26 | SKIP 27 | SKIP 28 | ) 29 | 30 | package() { 31 | install -D -m 744 -t "$pkgdir"/home/root/.local/bin "$srcdir"/toltecctl 32 | install -D -m 644 -t "$pkgdir"/lib/udev/rules.d/ "$srcdir"/15-systemd-input.rules 33 | } 34 | 35 | configure() { 36 | # shellcheck source=toltecctl 37 | source /home/root/.local/bin/toltecctl 38 | set-path 39 | 40 | # Apply the input udev rule 41 | udevadm control --reload-rules && udevadm trigger 42 | 43 | if [[ ! -d $opkg_conf_dir ]]; then 44 | # Migrate existing config in /opt/etc/opkg.conf to be generated 45 | # from split files and to use the multiarch repository layout 46 | local branch 47 | 48 | if [[ -f $opkg_conf ]]; then 49 | # Get the first (...) value (aka \1) of the pattern if matching 50 | branch="$(sed -E 's|^src/gz\s+toltec.*\s+https://toltec-dev.org/([[:alnum:]-]*).*$|\1|;t;d' "$opkg_conf" | head -n1)" 51 | else 52 | branch=stable 53 | fi 54 | 55 | create-entware-conf 56 | fi 57 | 58 | switch-branch "$(get-branch)" 59 | echo "Your Opkg configuration has been upgraded" 60 | if generate-opkg-conf; then 61 | echo 62 | echo "! The upgrade is not finished! Please run \`opkg update\`" 63 | echo "! and \`opkg upgrade\` once more to complete it." 64 | echo 65 | fi 66 | } 67 | 68 | postremove() { 69 | # Reload rules without the input udev rule 70 | udevadm control --reload-rules && udevadm trigger 71 | } 72 | -------------------------------------------------------------------------------- /package/toltec-completion/_launcherctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | # shellcheck disable=SC2016,SC2199,SC2207 5 | 6 | _launcherctl() { 7 | local cur prev words cword split 8 | _init_completion -s || return 9 | if [[ $cword -eq 1 ]]; then 10 | COMPREPLY=($(compgen -W 'help status logs list-launchers switch-launcher start-launcher stop-launcher list-apps list-running-apps list-paused-apps start-app stop-app pause-app resume-app is-current-launcher is-enabled-launcher is-active-launcher' -- "$cur")) 11 | return 12 | fi 13 | case ${words[1]} in 14 | logs) 15 | if [[ $cword -eq 2 ]]; then 16 | COMPREPLY+=($(compgen -W "--follow" -- "$cur")) 17 | fi 18 | return 19 | ;; 20 | switch-launcher) 21 | if [[ $cword -eq 2 ]]; then 22 | COMPREPLY+=($(compgen -W "--start $(launcherctl list-launchers)" -- "$cur")) 23 | elif [[ $cword -eq 3 ]]; then 24 | COMPREPLY+=($(compgen -W "$(launcherctl list-launchers)" -- "$cur")) 25 | fi 26 | return 27 | ;; 28 | start-app) 29 | if [[ $cword -eq 2 ]]; then 30 | COMPREPLY+=($(compgen -W "$(launcherctl list-apps)" -- "$cur")) 31 | fi 32 | ;; 33 | stop-app | pause-app) 34 | if [[ $cword -eq 2 ]]; then 35 | COMPREPLY+=($(compgen -W "$(launcherctl list-running-apps)" -- "$cur")) 36 | fi 37 | ;; 38 | resume-app) 39 | if [[ $cword -eq 2 ]]; then 40 | COMPREPLY+=($(compgen -W "$(launcherctl list-paused-apps)" -- "$cur")) 41 | fi 42 | ;; 43 | esac 44 | } 45 | 46 | complete -F _launcherctl launcherctl 47 | -------------------------------------------------------------------------------- /package/toltec-completion/_rcctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | # shellcheck disable=SC2016,SC2199,SC2207 5 | 6 | _rcctl() { 7 | local cur prev words cword split 8 | _init_completion -s || return 9 | if [[ $cword -eq 1 ]]; then 10 | COMPREPLY=($(compgen -W 'help start stop restart enable disable status logs list' -- "$cur")) 11 | return 12 | fi 13 | case ${words[1]} in 14 | start | stop | restart | enable | disable | status) 15 | if [[ $cword -eq 2 ]]; then 16 | COMPREPLY+=($(compgen -W "$(rcctl list)" -- "$cur")) 17 | fi 18 | return 19 | ;; 20 | logs) 21 | if [[ $cword -eq 2 ]]; then 22 | COMPREPLY+=($(compgen -W "--follow $(rcctl list)" -- "$cur")) 23 | elif [[ $cword -eq 3 ]]; then 24 | COMPREPLY+=($(compgen -W "$(rcctl list)" -- "$cur")) 25 | fi 26 | return 27 | ;; 28 | esac 29 | } 30 | 31 | complete -F _rcctl rcctl 32 | -------------------------------------------------------------------------------- /package/toltec-completion/_toltecctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | # shellcheck disable=SC2016,SC2199,SC2207 5 | 6 | _toltecctl() { 7 | local cur prev words cword split 8 | _init_completion -s || return 9 | 10 | if [[ $cword -eq 1 ]]; then 11 | COMPREPLY=($(compgen -W 'help generate-opkg-conf switch-branch reenable uninstall status' -- "$cur")) 12 | return 13 | fi 14 | 15 | if [[ $cword -eq 2 && ${words[1]} = 'switch-branch' ]]; then 16 | COMPREPLY=($(compgen -W 'stable testing' -- "$cur")) 17 | return 18 | fi 19 | } 20 | 21 | complete -F _toltecctl toltecctl 22 | -------------------------------------------------------------------------------- /package/toltec-completion/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(toltec-completion) 6 | pkgdesc="Expands bash-completion with functions for toltec-specific commands" 7 | url=https://github.com/toltec-dev/toltec 8 | pkgver=0.4.0-2 9 | timestamp=2022-01-23T23:29Z 10 | section="utils" 11 | maintainer="Linus K. " 12 | license=MIT 13 | installdepends=(bash-completion) 14 | 15 | source=( 16 | _opkg 17 | _toltecctl 18 | _launcherctl 19 | _rcctl 20 | ) 21 | sha256sums=( 22 | SKIP 23 | SKIP 24 | SKIP 25 | SKIP 26 | ) 27 | 28 | package() { 29 | local target_dir="$pkgdir"/opt/usr/share/bash-completion/completions 30 | install -d "$target_dir" 31 | cp "$srcdir"/_* "$target_dir" 32 | } 33 | -------------------------------------------------------------------------------- /package/toltec-deletions/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rm1os2 rm1os3 rm2os2 rm2os3) 6 | pkgnames=(toltec-deletions) 7 | pkgdesc="Metapackage to handle package deletions between OS versions" 8 | url=https://toltec-dev.org/ 9 | pkgver=0.1-9 10 | timestamp=2023-12-03T04:51:58Z 11 | section="utils" 12 | maintainer="Eeems " 13 | license=MIT 14 | installdepends=(toltec-bootstrap) 15 | conflicts_rm1os2=() 16 | replaces_rm1os2=() 17 | conflicts_rm2os2=() 18 | replaces_rm2os2=() 19 | conflicts_rm1os3=( 20 | ddvk-hacks 21 | fuse 22 | wireguard 23 | innernet-client 24 | gocryptfs 25 | remarkable-stylus 26 | ) 27 | replaces_rm1os3=( 28 | ddvk-hacks 29 | fuse 30 | wireguard 31 | innernet-client 32 | gocryptfs 33 | remarkable-stylus 34 | ) 35 | conflicts_rm2os3=( 36 | ddvk-hacks 37 | fuse 38 | wireguard 39 | innernet-client 40 | gocryptfs 41 | remarkable-stylus 42 | open-remarkable-shutdown 43 | ) 44 | replaces_rm2os3=( 45 | ddvk-hacks 46 | fuse 47 | wireguard 48 | innernet-client 49 | gocryptfs 50 | remarkable-stylus 51 | open-remarkable-shutdown 52 | ) 53 | 54 | source=() 55 | sha256sums=() 56 | 57 | package() { 58 | # This should be fully reinstalled on reenable 59 | # So add a file to root 60 | mkdir -p "$pkgdir"/usr/share/toltec/reenable.d 61 | touch "$pkgdir"/usr/share/toltec/reenable.d/toltec-deletions 62 | } 63 | -------------------------------------------------------------------------------- /package/vnsee/VNSee.oxide: -------------------------------------------------------------------------------- 1 | { 2 | "displayName": "VNSee", 3 | "description": "VNC client allowing you to use the device as a second screen", 4 | "bin": "/opt/bin/vnsee-gui", 5 | "icon": "/opt/etc/draft/icons/vnsee.png", 6 | "type": "foreground" 7 | } 8 | -------------------------------------------------------------------------------- /package/vnsee/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(vnsee) 6 | pkgdesc="VNC client allowing you to use the device as a second screen" 7 | url=https://github.com/matteodelabre/vnsee 8 | pkgver=0.4.1-2 9 | timestamp=2021-08-29T13:45:26Z 10 | section="screensharing" 11 | maintainer="Mattéo Delabre " 12 | license=GPL-3.0-only 13 | installdepends=(display libvncclient nmap simple) 14 | makedepends=(host:libvncclient host:libvncserver-dev) 15 | 16 | image=base:v2.1 17 | _boost_pp_ver=5e17804af2496e13ca0cc03d892b5351b637ea43 18 | source=( 19 | "https://github.com/matteodelabre/vnsee/archive/v${pkgver%-*}.zip" 20 | "https://github.com/boostorg/preprocessor/archive/$_boost_pp_ver.zip" 21 | vnsee-gui-set-path.patch 22 | vnsee.png 23 | vnsee.draft 24 | VNSee.oxide 25 | ) 26 | sha256sums=( 27 | bf6fd0d6478f0dd865bb25a4a4c061f306f53c84cff06ab51e0db36f518d6af9 28 | 3f2f07a0c0a0d7bb1392e646a40f73028069e4fe1fa18dd7fc45ef5f66641f32 29 | SKIP 30 | SKIP 31 | SKIP 32 | SKIP 33 | ) 34 | noextract=( 35 | "$_boost_pp_ver.zip" 36 | ) 37 | 38 | prepare() { 39 | patch -d "$srcdir" -p1 < "$srcdir"/vnsee-gui-set-path.patch 40 | bsdtar --strip-components 1 \ 41 | -xf "$srcdir"/"$_boost_pp_ver".zip \ 42 | -C "$srcdir"/vendor/boost-preprocessor 43 | } 44 | 45 | build() { 46 | cmake -B build \ 47 | -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ 48 | -DCMAKE_INSTALL_PREFIX="/opt" 49 | cmake --build build 50 | } 51 | 52 | package() { 53 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/build/vnsee "$srcdir"/vnsee-gui 54 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/vnsee.png 55 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/vnsee.draft 56 | install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/VNSee.oxide 57 | } 58 | -------------------------------------------------------------------------------- /package/vnsee/vnsee-gui-set-path.patch: -------------------------------------------------------------------------------- 1 | diff --git a/vnsee-gui b/vnsee-gui 2 | index f0c4171..5aab6c9 100755 3 | --- a/vnsee-gui 4 | +++ b/vnsee-gui 5 | @@ -6,6 +6,7 @@ 6 | # and starts VNSee with the right arguments 7 | 8 | set -euo pipefail 9 | +export PATH="/opt/bin:$PATH" 10 | 11 | if ! command -v simple > /dev/null; then 12 | echo "Error: $0 needs the 'simple' program to work" 13 | -------------------------------------------------------------------------------- /package/vnsee/vnsee.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=VNSee 5 | desc=VNC client allowing you to use the device as a second screen 6 | imgFile=vnsee 7 | call=/opt/bin/vnsee-gui 8 | term=: 9 | -------------------------------------------------------------------------------- /package/vnsee/vnsee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toltec-dev/toltec/9d15d2ddea4c58fc93e38f9ca0aed4d4afc5f9dc/package/vnsee/vnsee.png -------------------------------------------------------------------------------- /package/webinterface-localhost/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | _pkgname="webinterface-localhost" 6 | pkgnames=("$_pkgname") 7 | pkgdesc="View the web interface if running, on localhost. Useful for tailscale." 8 | url=https://toltec-dev.org/ 9 | pkgver=0.0.0-1 10 | timestamp=2024-03-11T13:03:16Z 11 | section="utils" 12 | maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" 13 | license=MIT 14 | 15 | source=( 16 | "$_pkgname.socket" 17 | "$_pkgname.service" 18 | ) 19 | 20 | sha256sums=( 21 | SKIP 22 | SKIP 23 | ) 24 | 25 | package() { 26 | install -D -m 644 -t "$pkgdir/lib/systemd/system" \ 27 | "$srcdir/$_pkgname.socket" 28 | install -D -m 644 -t "$pkgdir/lib/systemd/system" \ 29 | "$srcdir/$_pkgname.service" 30 | } 31 | 32 | configure() { 33 | systemctl daemon-reload 34 | 35 | if is-active "$pkgname".socket; then 36 | echo "Restarting $pkgname" 37 | systemctl restart "$pkgname".socket 38 | fi 39 | 40 | systemctl enable --now "$pkgname.socket" 41 | } 42 | 43 | preremove() { 44 | disable-unit "$pkgname.socket" 45 | } 46 | 47 | postremove() { 48 | systemctl daemon-reload 49 | } 50 | -------------------------------------------------------------------------------- /package/webinterface-localhost/webinterface-localhost.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=View the web interface if running, on localhost 3 | Requires=webinterface-localhost.socket 4 | After=webinterface-localhost.socket 5 | 6 | [Service] 7 | Type=notify 8 | ExecStart=/lib/systemd/systemd-socket-proxyd 10.11.99.1:80 9 | -------------------------------------------------------------------------------- /package/webinterface-localhost/webinterface-localhost.socket: -------------------------------------------------------------------------------- 1 | [Socket] 2 | Description=View the web interface if running, on localhost 3 | ListenStream=127.0.0.1:80 4 | FreeBind=true 5 | 6 | [Install] 7 | WantedBy=sockets.target 8 | -------------------------------------------------------------------------------- /package/webinterface-onboot/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | archs=(rmallos2 rmallos3) 6 | pkgnames=("webinterface-onboot") 7 | pkgdesc="Start the web interface without the cable, on boot." 8 | url="https://github.com/rM-self-serve/webinterface-onboot" 9 | pkgver=1.2.3-2 10 | timestamp=2023-12-31T11:43:00Z 11 | section="utils" 12 | maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" 13 | license=MIT 14 | conflicts=(signature-rm) 15 | conflicts_rmallos2=(ddvk-hacks) 16 | installdepends=(libbfd) 17 | 18 | source=( 19 | "$url"/archive/e184b6a37ccba0ebeacd34faf63c8f4cdfa5c448.zip 20 | "webinterface-onboot-toltec.service" 21 | ) 22 | sha256sums=( 23 | 2e3666b1875f874ef09da2bbd163295b89e9e241f1e59e77349b0e2db716b8ff 24 | SKIP 25 | ) 26 | 27 | package() { 28 | install -D -m 755 -t "$pkgdir/opt/bin" "$srcdir/$pkgname" 29 | install -D -m 644 "$srcdir/$pkgname-toltec.service" \ 30 | "$pkgdir/lib/systemd/system/$pkgname.service" 31 | 32 | mkdir -p "$pkgdir"/opt/share/toltec/reenable.d 33 | touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" 34 | } 35 | 36 | configure() { 37 | systemctl daemon-reload 38 | 39 | echo 40 | echo "Applying usb0 ip persistence" 41 | webinterface-onboot apply-prstip -y > /dev/null 42 | echo "Success" 43 | if webinterface-onboot is-hack-version > /dev/null; then 44 | echo 45 | echo "Applying binary modification" 46 | webinterface-onboot apply-hack -y > /dev/null 47 | echo "Success" 48 | fi 49 | 50 | echo 51 | echo "Run the following command to use $pkgname" 52 | how-to-enable "$pkgname.service" 53 | echo 54 | echo "Then restart xochitl or the device" 55 | } 56 | 57 | _restore() { 58 | if webinterface-onboot is-prstip-applied > /dev/null; then 59 | echo 60 | echo "Reverting usb0 ip persistence" 61 | webinterface-onboot revert-prstip -y > /dev/null 62 | echo "Success" 63 | fi 64 | 65 | if webinterface-onboot is-hack-applied > /dev/null; then 66 | echo 67 | echo "Reverting binary modification" 68 | if webinterface-onboot has-backup > /dev/null; then 69 | webinterface-onboot revert-hack --backup -y > /dev/null 70 | else 71 | webinterface-onboot revert-hack --reverse -y > /dev/null 72 | fi 73 | echo "Success" 74 | fi 75 | } 76 | 77 | preremove() { 78 | disable-unit "$pkgname.service" 79 | _restore 80 | } 81 | 82 | preupgrade() { 83 | _restore 84 | } 85 | 86 | postremove() { 87 | systemctl daemon-reload 88 | } 89 | -------------------------------------------------------------------------------- /package/webinterface-onboot/webinterface-onboot-toltec.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Enable the web interface on boot 3 | StartLimitIntervalSec=600 4 | StartLimitBurst=4 5 | After=home.mount sys-subsystem-net-devices-usb0.device 6 | 7 | [Service] 8 | Environment=HOME=/home/root 9 | Type=oneshot 10 | ExecStart=/opt/bin/webinterface-onboot local-exec 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /package/webinterface-upload-button/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=("webinterface-upload-button") 6 | pkgdesc="A simple upload button for the web interface" 7 | url="https://github.com/rM-self-serve/webinterface-upload-button" 8 | pkgver=1.1.1-3 9 | timestamp=2023-12-16T15:35:49Z 10 | section="utils" 11 | maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" 12 | license=MIT 13 | 14 | source=( 15 | "$url"/archive/1d28b2d91c0179059017696ae5a33aa49e1e7c7d.zip 16 | ) 17 | sha256sums=( 18 | f967cad7607da6458cb0e307b662db66026747922f98ad19f7e2265b9cab1f47 19 | ) 20 | 21 | package() { 22 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$pkgname" 23 | install -D -m 644 -t "$pkgdir"/usr/share/remarkable/webui/ "$srcdir/$pkgname.js" 24 | 25 | mkdir -p "$pkgdir"/opt/share/toltec/reenable.d 26 | touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" 27 | } 28 | 29 | configure() { 30 | echo 31 | echo "Applying webinterface-upload-button" 32 | webinterface-upload-button apply -y > /dev/null 33 | echo "Success" 34 | echo 35 | } 36 | 37 | _restore() { 38 | echo 39 | echo "Reverting webinterface-upload-button" 40 | webinterface-upload-button revert -y > /dev/null 41 | echo "Success" 42 | echo 43 | } 44 | 45 | preremove() { 46 | _restore 47 | } 48 | 49 | preupgrade() { 50 | _restore 51 | } 52 | -------------------------------------------------------------------------------- /package/webinterface-wifi/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | _pkgname="webinterface-wifi" 6 | pkgnames=("$_pkgname") 7 | pkgdesc="View the web interface if running, over wifi" 8 | url="https://github.com/rM-self-serve/$_pkgname" 9 | pkgver=2.0.0-2 10 | timestamp=2023-11-26T00:02:11Z 11 | section="utils" 12 | maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" 13 | license=MIT 14 | image=rust:v3.1 15 | 16 | _pkgalias="webint-wifi" 17 | _configdir="/home/root/.config/$_pkgname" 18 | _etcdir="/opt/etc/$_pkgname" 19 | 20 | source=( 21 | "$url/archive/4513d5cbc5e323f2959987f3bc9e300b0aaddb19.zip" 22 | "$_pkgname-toltec.service" 23 | ) 24 | 25 | sha256sums=( 26 | a23c05faf4ccaafea9222255399c8c3a121079dd07970c8768b4315606eb7834 27 | SKIP 28 | ) 29 | 30 | build() { 31 | WIW_DATADIR="/opt/etc" cargo build --release 32 | } 33 | 34 | package() { 35 | install -D -m 755 -t "$pkgdir/opt/bin" \ 36 | "$srcdir/target/armv7-unknown-linux-gnueabihf/release/$_pkgname" 37 | ln -s "/opt/bin/$_pkgname" "$pkgdir/opt/bin/$_pkgalias" 38 | 39 | install -D -m 644 "$srcdir/$_pkgname-toltec.service" \ 40 | "$pkgdir/lib/systemd/system/$_pkgname.service" 41 | 42 | install -D -m 644 -t "$pkgdir""$_etcdir/docs" \ 43 | "$srcdir/README.MD" "$srcdir"/config/*.toml 44 | install -D -m 644 -t "$pkgdir""$_etcdir/docs/config_examples" \ 45 | "$srcdir"/config/examples/*.toml 46 | install -D -m 644 -t "$pkgdir""$_etcdir"/assets \ 47 | "$srcdir/assets/favicon.ico" 48 | install -d "$pkgdir""$_etcdir/ssl" \ 49 | "$pkgdir""$_etcdir/auth" \ 50 | "$pkgdir""$_configdir" 51 | } 52 | 53 | configure() { 54 | [[ -f "$_configdir/config.toml" ]] \ 55 | || cp "$_etcdir/docs/config.default.toml" \ 56 | "$_configdir/config.toml" 57 | 58 | systemctl daemon-reload 59 | 60 | if is-active "$pkgname"; then 61 | echo "Restarting $pkgname" 62 | systemctl restart "$pkgname" 63 | fi 64 | 65 | echo "" 66 | echo "Run '\$ $pkgname' for usage information and a link to" 67 | echo "the documentation. You can also find the documentation locally" 68 | echo "at /opt/etc/webinterface-wifi/docs/" 69 | echo "" 70 | echo "Run the following command to use $pkgname" 71 | how-to-enable "$pkgname.service" 72 | } 73 | 74 | preremove() { 75 | disable-unit "$pkgname.service" 76 | } 77 | 78 | postremove() { 79 | rmdir "$_etcdir"/*/* "$_etcdir"/* "$_etcdir" 2> /dev/null || true 80 | systemctl daemon-reload 81 | } 82 | -------------------------------------------------------------------------------- /package/webinterface-wifi/webinterface-wifi-toltec.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=View the web interface if running, over wifi 3 | StartLimitIntervalSec=600 4 | StartLimitBurst=4 5 | After=home.mount 6 | 7 | [Service] 8 | Type=simple 9 | Environment=HOME=/home/root 10 | Environment=WEBINT_WIFI_RUN_ENV=DAEMON 11 | ExecStart=/opt/bin/webinterface-wifi local-exec 12 | Restart=on-failure 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /package/whiteboard-hypercard/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2024 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(whiteboard-hypercard) 6 | pkgdesc="Real-time collaboration, drawing or whiteboarding" 7 | url=https://github.com/fenollp/reMarkable-tools 8 | pkgver=0.5.0-1 9 | timestamp=2024-09-12T19:00:22Z 10 | section="drawing" 11 | maintainer="Pierre Fenoll " 12 | license=CC-BY-NC-ND 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=rust:v3.2 17 | source=( 18 | https://github.com/fenollp/reMarkable-tools/archive/refs/tags/v0.5.0.zip 19 | whiteboard-hypercard.draft 20 | ) 21 | sha256sums=( 22 | 668f0b1dbc6027f6f6b8ab69f65c844a718f38115f79b9ce79e060a1cef3edfb 23 | SKIP 24 | ) 25 | 26 | build() { 27 | pushd marauder 28 | rustup component add rustfmt 29 | cargo fetch 30 | cargo build --release --package=marauder --bin=whiteboard --locked --frozen --offline --target=armv7-unknown-linux-gnueabihf 31 | popd 32 | } 33 | 34 | package() { 35 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/whiteboard 36 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/whiteboard-hypercard.draft 37 | } 38 | -------------------------------------------------------------------------------- /package/whiteboard-hypercard/whiteboard-hypercard.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=whiteboard 5 | desc=live whiteboard 6 | call=/opt/bin/whiteboard 7 | term=killall -q -9 whiteboard 8 | -------------------------------------------------------------------------------- /package/wikipedia/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(wikipedia) 6 | pkgdesc="The free encyclopedia" 7 | url=https://github.com/dps/remarkable-wikipedia 8 | pkgver=0.1.0-4 9 | timestamp=2021-03-11T04:50Z 10 | section="readers" 11 | maintainer="David Singleton " 12 | license=MIT 13 | installdepends=(display) 14 | flags=(patch_rm2fb) 15 | 16 | image=qt:v2.1 17 | source=( 18 | https://github.com/dps/remarkable-wikipedia/archive/eb00876ef49e7deedc127bc6c1486e3ed13aedcc.zip 19 | wikipedia.draft 20 | wikipedia.png 21 | ) 22 | sha256sums=( 23 | 9139cf41c8950126780273977b3d70f8126da8a87066db6c21845d8409ad34b2 24 | SKIP 25 | SKIP 26 | ) 27 | 28 | build() { 29 | sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/' qtwikipedia.pro 30 | qmake qtwikipedia.pro 31 | make 32 | } 33 | 34 | package() { 35 | install -D -m 755 "$srcdir"/qtwikipedia "$pkgdir"/opt/bin/qtwikipedia 36 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/wikipedia.draft 37 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/wikipedia.png 38 | } 39 | -------------------------------------------------------------------------------- /package/wikipedia/wikipedia.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=wikipedia 5 | desc=The free encyclopedia 6 | call=/opt/bin/qtwikipedia 7 | term=: 8 | imgFile=wikipedia -------------------------------------------------------------------------------- /package/wikipedia/wikipedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toltec-dev/toltec/9d15d2ddea4c58fc93e38f9ca0aed4d4afc5f9dc/package/wikipedia/wikipedia.png -------------------------------------------------------------------------------- /package/wireguard/fix-multiple-yylloc-definitions.patch: -------------------------------------------------------------------------------- 1 | diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l 2 | index 790fbf6c..e7eab4d7 100644 3 | --- a/scripts/dtc/dtc-lexer.l 4 | +++ b/scripts/dtc/dtc-lexer.l 5 | @@ -38,7 +38,7 @@ LINECOMMENT "//".*\n 6 | #include "srcpos.h" 7 | #include "dtc-parser.tab.h" 8 | 9 | -YYLTYPE yylloc; 10 | +extern YYLTYPE yylloc; 11 | extern bool treesource_error; 12 | 13 | /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ 14 | diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped 15 | index ba525c2f..a2fe8dbc 100644 16 | --- a/scripts/dtc/dtc-lexer.lex.c_shipped 17 | +++ b/scripts/dtc/dtc-lexer.lex.c_shipped 18 | @@ -637,7 +637,7 @@ char *yytext; 19 | #include "srcpos.h" 20 | #include "dtc-parser.tab.h" 21 | 22 | -YYLTYPE yylloc; 23 | +extern YYLTYPE yylloc; 24 | extern bool treesource_error; 25 | 26 | /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ 27 | -------------------------------------------------------------------------------- /package/wireguard/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | archs=(rm1os2 rm2os2) 5 | pkgnames=(wireguard) 6 | pkgdesc="Fast, modern, secure VPN tunnel" 7 | url=https://www.wireguard.com 8 | pkgver=1.0.20220627-1 9 | timestamp=2021-02-19T14:08Z 10 | section=kernel 11 | maintainer="Jonah Weissman " 12 | license=GPL-2.0-only 13 | makedepends=(build:bc build:lzop build:git build:flex build:bison build:libssl-dev) 14 | flags=(nostrip) 15 | installdepends=(wireguard-tools) 16 | 17 | _kernelrepo=https://github.com/remarkable/linux 18 | _kernelrevs=( 19 | bb6be69d6f71fced2fc63c61372bf96e5f7da565 20 | bb6be69d6f71fced2fc63c61372bf96e5f7da565 21 | ) 22 | _defconfigs=( 23 | arch/arm/configs/zero-gravitas_defconfig 24 | arch/arm/configs/zero-sugar_defconfig 25 | ) 26 | 27 | image=base:v3.2 28 | source=( 29 | "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${pkgver%-*}.tar.xz" 30 | fix-multiple-yylloc-definitions.patch 31 | ) 32 | sha256sums=( 33 | 362d412693c8fe82de00283435818d5c5def7f15e2433a07a9fe99d0518f63c0 34 | SKIP 35 | ) 36 | 37 | build() { 38 | mkdir pkg 39 | git init linux 40 | for i in $(seq 0 1); do 41 | ( 42 | cd linux 43 | git fetch --depth=1 "$_kernelrepo" "${_kernelrevs[$i]}" 44 | git checkout -f "${_kernelrevs[$i]}" 45 | git apply "$srcdir"/fix-multiple-yylloc-definitions.patch || true 46 | make mrproper 47 | touch .scmversion 48 | cp "${_defconfigs[$i]}" .config 49 | echo "CONFIG_NET_FOU=m" >> .config 50 | make olddefconfig 51 | make net/ipv4/udp_tunnel.ko 52 | make net/ipv6/ip6_udp_tunnel.ko 53 | make modules_prepare 54 | ) 55 | 56 | make -C src/ "KERNELDIR=$(realpath linux)" 57 | KERNELRELEASE=$(cat linux/include/config/kernel.release) 58 | export MOD_INSTALL_PATH="pkg/$KERNELRELEASE" 59 | install -D -m 644 linux/net/ipv4/udp_tunnel.ko \ 60 | "$MOD_INSTALL_PATH/kernel/net/ipv4/udp_tunnel.ko" 61 | install -D -m 644 linux/net/ipv6/ip6_udp_tunnel.ko \ 62 | "$MOD_INSTALL_PATH/kernel/net/ipv6/ip6_udp_tunnel.ko" 63 | install -D -m 644 src/wireguard.ko \ 64 | "$MOD_INSTALL_PATH/extra/wireguard.ko" 65 | done 66 | } 67 | 68 | package() { 69 | mkdir -p "$pkgdir/lib/modules" 70 | cp -r "$srcdir/pkg"/* "$pkgdir/lib/modules" 71 | } 72 | 73 | configure() { 74 | depmod -a 75 | } 76 | 77 | postremove() { 78 | cat << MSG 79 | Wireguard has been removed. 80 | The kernel module will remain loaded until you reboot, or you can attempt 81 | to manually remove it by running "modprobe -r wireguard". 82 | MSG 83 | depmod -a 84 | } 85 | 86 | postupgrade() { 87 | cat << MSG 88 | Wireguard has been upgraded. 89 | The old kernel module will remain loaded until you reboot, or you can 90 | attempt to manually remove it by running "modprobe -r wireguard". 91 | MSG 92 | } 93 | -------------------------------------------------------------------------------- /package/xochitl/env-readme: -------------------------------------------------------------------------------- 1 | # Files in this directory are sourced before running Xochitl. 2 | # See also the /opt/bin/xochitl wrapper script. 3 | # 4 | # Please do not modify files shipped by Toltec, or they risk being 5 | # overwritten with updates. Instead create your own files in this directory. 6 | -------------------------------------------------------------------------------- /package/xochitl/kill-xochitl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | killall xochitl 6 | -------------------------------------------------------------------------------- /package/xochitl/launcherctl-xochitl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | case "$1" in 4 | is-active) 5 | systemctl is-active --quiet xochitl.service 6 | ;; 7 | is-enabled) 8 | systemctl is-enabled --quiet xochitl.service 9 | ;; 10 | logs) 11 | if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then 12 | journalctl --follow --all --unit xochitl.service 13 | else 14 | journalctl --no-pager --all --unit xochitl.service 15 | fi 16 | ;; 17 | start | launch) 18 | systemctl start xochitl.service 19 | ;; 20 | stop | close) 21 | systemctl stop xochitl.service 22 | ;; 23 | enable) 24 | systemctl enable xochitl.service 25 | ;; 26 | disable) 27 | systemctl disable xochitl.service 28 | ;; 29 | apps) 30 | echo "xochitl" 31 | ;; 32 | running) 33 | if "$0" is-active; then 34 | echo "xochitl" 35 | fi 36 | ;; 37 | *) 38 | echo "Xochitl does not support this method" 39 | exit 1 40 | ;; 41 | esac 42 | -------------------------------------------------------------------------------- /package/xochitl/manual-sync@.service: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | [Unit] 5 | Description=reMarkable Document Sync without the xochitl.service dependency 6 | After=dbus.socket 7 | StartLimitIntervalSec=60 8 | StartLimitBurst=4 9 | Conflicts=%i.service 10 | 11 | [Service] 12 | # Do NOT make this dbus, systemd will kill the service when it should be 13 | # running otherwise. 14 | Type=simple 15 | BusName=no.remarkable.sync 16 | ExecStart=/usr/bin/%i --service 17 | Restart=on-failure 18 | RestartForceExitStatus=SIGHUP SIGINT SIGTERM SIGPIPE 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /package/xochitl/toltec-after-launcher.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | After=launcher.service 3 | -------------------------------------------------------------------------------- /package/xochitl/toltec-wrapper.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart= 3 | ExecStart=/opt/bin/xochitl --system 4 | 5 | [Install] 6 | Alias=launcher.service 7 | -------------------------------------------------------------------------------- /package/xochitl/xochitl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | for file in /opt/etc/xochitl.env.d/*.env; do 6 | if [[ -r $file ]]; then 7 | echo "Sourcing $file" 8 | # shellcheck disable=SC1090 9 | source "$file" 10 | fi 11 | done 12 | 13 | # If for some reason, sync.service is no longer masked, re-mask it 14 | # The package install should have handled this, but something may 15 | # have changed it. 16 | if [[ "x$(systemctl is-enabled sync.service)" != "xmasked" ]]; then 17 | systemctl mask sync.service 18 | fi 19 | 20 | if [[ "x$(systemctl is-enabled rm-sync.service)" != "xmasked" ]]; then 21 | systemctl mask rm-sync.service 22 | fi 23 | 24 | if [ -f /usr/bin/rm-sync ] && ! is-active manual-sync@rm-sync.service; then 25 | systemctl enable --now manual-sync@rm-sync.service 26 | elif [ -f /usr/bin/sync ] && ! is-active manual-sync@sync.service; then 27 | systemctl enable --now manual-sync@sync.service 28 | fi 29 | 30 | exec -a /usr/bin/xochitl /usr/bin/xochitl "$@" 31 | -------------------------------------------------------------------------------- /package/xochitl/xochitl.draft: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | 4 | name=xochitl 5 | desc=Read documents and take notes 6 | call=/opt/bin/xochitl 7 | term=killall xochitl 8 | imgFile=xochitl 9 | -------------------------------------------------------------------------------- /package/xochitl/xochitl.oxide: -------------------------------------------------------------------------------- 1 | { 2 | "displayName": "Xochitl", 3 | "description": "Read documents and take notes", 4 | "bin": "/opt/bin/xochitl", 5 | "icon": "/opt/etc/draft/icons/xochitl.png", 6 | "flags": ["nosplash"] 7 | } 8 | -------------------------------------------------------------------------------- /package/xochitl/xochitl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toltec-dev/toltec/9d15d2ddea4c58fc93e38f9ca0aed4d4afc5f9dc/package/xochitl/xochitl.png -------------------------------------------------------------------------------- /package/yaft/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2022 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(yaft) 6 | pkgdesc="Yet another framebuffer terminal" 7 | url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft 8 | _tag=0.1.2 9 | pkgver=${_tag}-1 10 | timestamp=2024-05-29T17:05:56Z 11 | maintainer="Mattéo Delabre " 12 | license=GPL-3.0 13 | section="admin" 14 | image=base:v3.1 15 | installdepends=(display terminfo) 16 | flags=(nostrip) 17 | 18 | source=() 19 | sha256sums=() 20 | 21 | prepare() { 22 | cd "$srcdir" 23 | mkdir -p yaft 24 | cd yaft 25 | git init 26 | git lfs install 27 | git remote add origin https://github.com/timower/rM2-stuff.git 28 | git fetch --depth 1 origin tag v${_tag} --no-tags 29 | git checkout v${_tag} 30 | git lfs fetch 31 | git lfs checkout 32 | } 33 | 34 | build() { 35 | cd "$srcdir" 36 | mkdir install 37 | cd yaft 38 | cmake --preset release-toltec 39 | cmake \ 40 | --build build/release-toltec \ 41 | --target yaft 42 | cmake \ 43 | --install build/release-toltec \ 44 | --prefix ../install \ 45 | --component yaft \ 46 | --strip 47 | } 48 | 49 | package() { 50 | cp -r "$srcdir/install/." "$pkgdir" 51 | } 52 | -------------------------------------------------------------------------------- /package/zerotier-one/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2023 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(zerotier zerotier-one zerotier-one-doc zerotier-selftest) 6 | url=https://github.com/zerotier/ZeroTierOne 7 | _upver=1.14.2 8 | pkgver=${_upver}-1 9 | timestamp=2024-10-29T16:17:48Z 10 | maintainer="Eeems " 11 | license=BUSL-1.1 12 | section="utils" 13 | image=base:v3.0 14 | 15 | source=("https://github.com/zerotier/ZeroTierOne/archive/refs/tags/${_upver}.zip") 16 | sha256sums=(529dd6d246f51ca7cb0b14794ba68560c0134409f94fcc61a3ee7f5c173c301f) 17 | 18 | build() { 19 | sed -i \ 20 | -e 's|/usr/sbin|/opt/bin|' \ 21 | -e 's|/usr/share|/opt/share|' \ 22 | -e 's|/var/lib|/opt/var/lib|' \ 23 | make-linux.mk \ 24 | debian/zerotier-one.service 25 | sed -i \ 26 | -e 's|/var/lib/zerotier-one|/opt/var/lib/zerotier-one|' \ 27 | osdep/OSUtils.cpp 28 | sed -i \ 29 | -e 's|/var/lib/zerotier|/opt/var/lib/zerotier|' \ 30 | doc/zerotier-cli.1 \ 31 | doc/zerotier-cli.1.md \ 32 | doc/zerotier-one.8 \ 33 | doc/zerotier-one.8.md 34 | # Disable SSO as the rust build is broken in rust:v3.0 due to issues with dependencies 35 | export ZT_SSO_SUPPORTED=0 36 | export ZT_EMBEDDED=1 37 | export CC=arm-linux-gnueabihf-gcc 38 | export CXX=arm-linux-gnueabihf-g++ 39 | export AR=arm-linux-gnueabihf-ar 40 | export STRIP=arm-linux-gnueabihf-strip 41 | make 42 | make selftest 43 | } 44 | 45 | zerotier() { 46 | pkgdesc="A Smart Ethernet Switch for Earth" 47 | installdepends=(zerotier-one) 48 | # Using 1: to make sure our version always overrides the entware version 49 | pkgver="1:${pkgver}" 50 | package() { 51 | # This is just a wrapper package 52 | true 53 | } 54 | } 55 | 56 | zerotier-one() { 57 | pkgdesc="A Smart Ethernet Switch for Earth" 58 | package() { 59 | cd "$srcdir" 60 | DESTDIR="$pkgdir" make install 61 | rm -r "$pkgdir"/opt/share 62 | install -D -m0644 debian/zerotier-one.service "$pkgdir"/etc/systemd/system/zerotier-one.service 63 | } 64 | configure() { 65 | if ! is-enabled zerotier-one.service; then 66 | how-to-enable zerotier-one.service 67 | fi 68 | if is-active zerotier-one.service; then 69 | systemctl restart zerotier-one.service 70 | fi 71 | } 72 | preremove() { 73 | disable-unit zerotier-one.service 74 | } 75 | } 76 | 77 | zerotier-one-doc() { 78 | installdepends=(man-db) 79 | pkgdesc="Man files for zerotier-one" 80 | package() { 81 | cd "$srcdir" 82 | DESTDIR="$pkgdir" make install 83 | rm -r "$pkgdir"/opt/bin 84 | rm -r "$pkgdir"/opt/var 85 | } 86 | } 87 | 88 | zerotier-selftest() { 89 | pkgdesc="Unit test zerotier to ensure that it works as expected on the system" 90 | package() { 91 | install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/zerotier-selftest 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /package/zoneinfo-utils/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | # Inspired by https://github.com/archlinux/svntogit-packages/blob/packages/tzdata/trunk/PKGBUILD 6 | 7 | pkgnames=(zoneinfo-utils) 8 | pkgdesc="Utilities for interacting with zoneinfo files" 9 | url=https://www.iana.org/time-zones 10 | _tzver=2023c 11 | pkgver="$_tzver"-1 12 | timestamp=2023-03-28T00:00Z 13 | section=utils 14 | maintainer="Eeems " 15 | license="custom: public domain" 16 | installdepends=(zoneinfo-core) 17 | makedepends=(build:gawk) 18 | flags=(nostrip) 19 | 20 | image=base:v3.0 21 | source=( 22 | "https://www.iana.org/time-zones/repository/releases/tzcode${_tzver}.tar.gz" 23 | "https://www.iana.org/time-zones/repository/releases/tzdata${_tzver}.tar.gz" 24 | ) 25 | sha256sums=( 26 | 46d17f2bb19ad73290f03a203006152e0fa0d7b11e5b71467c4a823811b214e7 27 | 3f510b5d1b4ae9bb38e485aa302a776b317fb3637bdb6404c4adf7b6cadd965c 28 | ) 29 | 30 | prepare() { 31 | sed -i "s:sbin:bin:" Makefile 32 | } 33 | 34 | build() { 35 | mkdir .x86 36 | pushd .x86 > /dev/null 37 | 38 | shopt -s extglob 39 | ln -s ../* . 40 | make VERSION="$_tzver" zic 41 | mv zic ../zic.x86 42 | 43 | popd > /dev/null 44 | rm -r .x86 45 | make VERSION="$_tzver" CC=arm-linux-gnueabihf-cc 46 | "${CROSS_COMPILE}strip" --strip-all zic zdump 47 | } 48 | 49 | package() { 50 | pushd "${srcdir}" > /dev/null 51 | 52 | local zic=./zic.x86 53 | # install tzcode stuff 54 | make DESTDIR="${pkgdir}" zic="$zic" install 55 | # install license 56 | install -Dm644 LICENSE "${pkgdir}"/opt/usr/share/licenses/tzdata/LICENSE 57 | 58 | popd > /dev/null 59 | 60 | mv "${pkgdir}"/usr/{lib,share/man} "${pkgdir}"/opt/usr 61 | mv "${pkgdir}"/usr/{s,}bin "${pkgdir}"/opt 62 | 63 | install -D -m 644 -t "$pkgdir"/opt/share/zoneinfo "$srcdir"/iso3166.tab 64 | install -D -m 644 -t "$pkgdir"/opt/share/zoneinfo "$srcdir"/zone1970.tab 65 | 66 | # cleanup 67 | rm -rf "${pkgdir:?}"/{etc,usr} 68 | } 69 | 70 | configure() { 71 | add-bind-mount /home/root/.entware/share/zoneinfo \ 72 | /usr/share/zoneinfo 73 | } 74 | 75 | postremove() { 76 | remove-bind-mount /usr/share/zoneinfo 77 | } 78 | -------------------------------------------------------------------------------- /package/zshelf/package: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | pkgnames=(zshelf) 6 | pkgdesc="Z-Library browser and downloader" 7 | url=https://github.com/khanhas/zshelf 8 | pkgver=0.3.1-4 9 | section=utils 10 | timestamp=2021-02-20T01:45Z 11 | maintainer="khanhas " 12 | license=GPL-3.0 13 | installdepends=(node display) 14 | makedepends=(build:imagemagick build:librsvg2-bin) 15 | flags=(patch_rm2fb) 16 | 17 | image=qt:v2.1 18 | source=( 19 | https://github.com/khanhas/zshelf/archive/v0.3.1.zip 20 | zshelf.draft 21 | zshelf.png 22 | ) 23 | sha256sums=( 24 | 8069277e24b58b44466b038c5b319daa824f39bdcbdea0731fedb0b5263e3bd7 25 | SKIP 26 | SKIP 27 | ) 28 | 29 | build() { 30 | qmake zshelf.pro 31 | make 32 | 33 | curl https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-x64.tar.xz > /root/node.tar.xz 34 | tar -C / -xf /root/node.tar.xz 35 | export PATH="/node-v14.15.4-linux-x64/bin:$PATH" 36 | 37 | cd backend 38 | npm install 39 | } 40 | 41 | package() { 42 | install -d "$pkgdir"/opt/lib/zshelf 43 | 44 | cp -r "$srcdir"/backend "$pkgdir"/opt/lib/zshelf/backend 45 | install -D -m 755 -t "$pkgdir"/opt/lib/zshelf "$srcdir"/zshelf 46 | install -d "$pkgdir"/opt/bin 47 | ln -s /opt/lib/zshelf/zshelf "$pkgdir"/opt/bin/zshelf 48 | 49 | install -d "$pkgdir"/opt/etc/zshelf 50 | install -D -m 644 -t "$pkgdir"/opt/etc/zshelf "$srcdir"/config.json 51 | ln -s /opt/etc/zshelf/config.json "$pkgdir"/opt/lib/zshelf/config.json 52 | 53 | install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/zshelf.draft 54 | install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/zshelf.png 55 | } 56 | 57 | configure() { 58 | echo "" 59 | echo "To download books, you have to configure domain and cookie first." 60 | echo "Please follow instructions on:" 61 | echo "https://github.com/khanhas/zshelf#important-configure-domain-and-cookie" 62 | echo "Config file locates at:" /opt/etc/zshelf/config.json 63 | echo "" 64 | } 65 | -------------------------------------------------------------------------------- /package/zshelf/zshelf.draft: -------------------------------------------------------------------------------- 1 | name=ZShelf 2 | desc=Z-Library browser and downloader 3 | call=/opt/bin/zshelf 4 | imgFile=zshelf 5 | term=killall zshelf 6 | -------------------------------------------------------------------------------- /package/zshelf/zshelf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toltec-dev/toltec/9d15d2ddea4c58fc93e38f9ca0aed4d4afc5f9dc/package/zshelf/zshelf.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | black==24.8.0 2 | certifi==2023.7.22 3 | idna==3.4 4 | isort==5.12.0 5 | Jinja2==3.1.2 6 | lazy-object-proxy==1.9.0 7 | mypy-extensions==1.0.0 8 | mypy==1.7.1 9 | pylint==3.0.3 10 | six==1.16.0 11 | toltecmk==0.3.3 12 | toml==0.10.2 13 | types-python-dateutil==2.8.19.14 14 | types-requests==2.31.0.2 15 | typing-extensions==4.7.1 16 | websocket-client==1.6.1 17 | 18 | # Pinned due to https://github.com/docker/docker-py/issues/3256 19 | requests==2.31.0 20 | -------------------------------------------------------------------------------- /scripts/build/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toltec-dev/toltec/9d15d2ddea4c58fc93e38f9ca0aed4d4afc5f9dc/scripts/build/__init__.py -------------------------------------------------------------------------------- /scripts/build/paths.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | """Well-known paths for Toltec.""" 4 | 5 | import os 6 | 7 | # Root directory where this clone of the Toltec repo lives 8 | GIT_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..")) 9 | 10 | # Directory where the tooling scripts are stored 11 | SCRIPTS_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..")) 12 | 13 | # Directory where recipes can be found 14 | RECIPE_DIR = os.path.join(GIT_DIR, "package") 15 | 16 | # Working directory for building recipes 17 | WORK_DIR = os.path.join(GIT_DIR, "build", "package") 18 | 19 | # Directory used for storing built packages 20 | REPO_DIR = os.path.join(GIT_DIR, "build", "repo") 21 | -------------------------------------------------------------------------------- /scripts/build/util.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 The Toltec Contributors 2 | # SPDX-License-Identifier: MIT 3 | """Collection of useful functions.""" 4 | 5 | import itertools 6 | from typing import ( 7 | Any, 8 | Callable, 9 | Dict, 10 | List, 11 | Protocol, 12 | Sequence, 13 | TypeVar, 14 | ) 15 | 16 | 17 | # See 18 | class SupportsLessThan(Protocol): # pylint:disable=too-few-public-methods 19 | """Types that support the less-than operator.""" 20 | 21 | def __lt__(self, other: Any) -> bool: 22 | ... 23 | 24 | 25 | Key = TypeVar("Key", bound=SupportsLessThan) 26 | Value = TypeVar("Value") 27 | 28 | 29 | def group_by( 30 | in_seq: Sequence[Value], key_fn: Callable[[Value], Key] 31 | ) -> Dict[Key, List[Value]]: 32 | """ 33 | Group elements of a list. 34 | 35 | :param in_seq: list of elements to group 36 | :param key_fn: mapping of each element onto a group 37 | :returns: dictionary of groups 38 | """ 39 | return dict( 40 | (key, list(group)) 41 | for key, group in itertools.groupby( 42 | sorted(in_seq, key=key_fn), key=key_fn 43 | ) 44 | ) 45 | -------------------------------------------------------------------------------- /scripts/package_build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | """Build packages from a given recipe.""" 5 | 6 | import argparse 7 | import logging 8 | import os 9 | import sys 10 | from typing import ( 11 | Dict, 12 | List, 13 | Optional, 14 | ) 15 | from build import paths 16 | from build.repo import Repo 17 | from toltec import parse_recipe # type: ignore 18 | from toltec.builder import Builder # type: ignore 19 | from toltec.recipe import Package # type: ignore 20 | from toltec.repo import make_index # type: ignore 21 | from toltec.util import argparse_add_verbose, LOGGING_FORMAT # type: ignore 22 | 23 | parser = argparse.ArgumentParser(description=__doc__) 24 | 25 | parser.add_argument( 26 | "recipe_name", 27 | metavar="RECIPENAME", 28 | help="name of the recipe to build", 29 | ) 30 | 31 | parser.add_argument( 32 | "-a", 33 | "--arch-name", 34 | metavar="ARCHNAME", 35 | action="append", 36 | help="""only build for the given architecture (can 37 | be repeated)""", 38 | ) 39 | 40 | parser.add_argument( 41 | "packages_names", 42 | nargs="*", 43 | metavar="PACKAGENAME", 44 | help="list of packages to build (default: all packages from the recipe)", 45 | ) 46 | 47 | argparse_add_verbose(parser) 48 | 49 | args = parser.parse_args() 50 | logging.basicConfig(format=LOGGING_FORMAT, level=args.verbose) 51 | repo = Repo(paths.RECIPE_DIR, paths.REPO_DIR) 52 | builder = Builder(paths.WORK_DIR, paths.REPO_DIR) 53 | arch_packages: Optional[Dict[str, Optional[List[Package]]]] = None 54 | 55 | with Builder( 56 | os.path.join(paths.WORK_DIR, args.recipe_name), paths.REPO_DIR 57 | ) as builder: 58 | recipe_bundle = parse_recipe(f"package/{args.recipe_name}") 59 | build_matrix: Optional[Dict[str, Optional[List[Package]]]] = None 60 | if args.arch_name or args.packages_names: 61 | build_matrix = {} 62 | for arch, recipes in recipe_bundle.items(): 63 | if args.package_name: 64 | build_matrix[arch] = [ 65 | recipes.packages[pkg_name] for pkg_name in args.package_name 66 | ] 67 | else: 68 | build_matrix[arch] = None 69 | 70 | if not builder.make(recipe_bundle, build_matrix, False): 71 | sys.exit(1) 72 | 73 | make_index(paths.REPO_DIR) 74 | -------------------------------------------------------------------------------- /scripts/repo-check: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) 2020 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | set -e 6 | source scripts/package-lib 7 | 8 | usage="$0 [OPTION]... LOCALREPO [REMOTEREPO] 9 | 10 | Check that the LOCALREPO and REMOTEREPO repositories are identical. 11 | If REMOTEREPO is omitted, 'https://toltec-dev.org/testing' is used. 12 | 13 | Options: 14 | 15 | -h Show this help message." 16 | 17 | helpflag= 18 | 19 | while getopts hf name; do 20 | case $name in 21 | h) helpflag=1 ;; 22 | *) error "Invalid option. Use the -h flag for more information." ;; 23 | esac 24 | done 25 | 26 | shift $((OPTIND - 1)) 27 | 28 | if [[ -n $helpflag ]]; then 29 | echo "$usage" 30 | exit 31 | fi 32 | 33 | if [[ $# -eq 0 ]]; then 34 | error "Missing LOCALREPO argument. Use the -h flag for more information." 35 | fi 36 | 37 | localrepo="$1" 38 | remoterepo="https://toltec-dev.org/testing" 39 | 40 | if [[ $# -eq 2 ]]; then 41 | remoterepo="$2" 42 | fi 43 | 44 | if [[ $# -gt 2 ]]; then 45 | error "Extraneous arguments. Use the -h flag for more information." 46 | fi 47 | 48 | differs= 49 | 50 | if [[ ! -f "$localrepo"/Packages ]]; then 51 | error "Local repository is missing packages index" 52 | fi 53 | 54 | for localfile in "$localrepo"/*; do 55 | file="$(realpath --relative-to="$localrepo" "$localfile")" 56 | remotefileurl="$remoterepo"/"$file" 57 | 58 | section "Checking $file" 59 | 60 | remotefile="$(mktemp)" 61 | rsecurl "$remotefileurl" -o "$remotefile" 62 | 63 | if ! tardiff "$localfile" "$remotefile" "local $file" "remote $file"; then 64 | differs=yes 65 | fi 66 | 67 | rm "$remotefile" 68 | done 69 | 70 | if [[ -n $differs ]]; then 71 | error "Some files differ" 72 | else 73 | section "Successful" 74 | fi 75 | -------------------------------------------------------------------------------- /scripts/repo_build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (c) 2021 The Toltec Contributors 3 | # SPDX-License-Identifier: MIT 4 | """Build all packages and create a package index.""" 5 | 6 | import argparse 7 | import logging 8 | import os 9 | from typing import ( 10 | Dict, 11 | List, 12 | Optional, 13 | ) 14 | from build import paths 15 | from build.repo import Repo, PackageStatus 16 | from toltec.recipe import Package # type: ignore 17 | from toltec import parse_recipe # type: ignore 18 | from toltec.builder import Builder # type: ignore 19 | from toltec.repo import make_index # type: ignore 20 | from toltec.util import argparse_add_verbose, LOGGING_FORMAT # type: ignore 21 | 22 | parser = argparse.ArgumentParser(description=__doc__) 23 | 24 | parser.add_argument( 25 | "-d", 26 | "--diff", 27 | action="store_true", 28 | help="only keep new packages that do not exist on the remote repository", 29 | ) 30 | 31 | argparse_add_verbose(parser) 32 | 33 | group = parser.add_mutually_exclusive_group() 34 | 35 | group.add_argument( 36 | "-l", 37 | "--local", 38 | action="store_true", 39 | help="""by default, packages missing from the local repository are not 40 | rebuilt if they already exist on the remote repository — pass this flag to 41 | disable this behavior""", 42 | ) 43 | 44 | group.add_argument( 45 | "-r", 46 | "--remote-repo", 47 | default="https://toltec-dev.org/testing", 48 | metavar="URL", 49 | help="""root of a remote repository used to know which packages 50 | are already built (default: %(default)s)""", 51 | ) 52 | 53 | args = parser.parse_args() 54 | remote = args.remote_repo if not args.local else None 55 | logging.basicConfig(format=LOGGING_FORMAT, level=args.verbose) 56 | 57 | repo = Repo(paths.RECIPE_DIR, paths.REPO_DIR) 58 | results = repo.fetch_packages(remote) 59 | 60 | os.makedirs(paths.REPO_DIR, exist_ok=True) 61 | make_index(paths.REPO_DIR) 62 | 63 | fetched = results[PackageStatus.Fetched] 64 | missing = results[PackageStatus.Missing] 65 | ordered_missing = repo.order_dependencies( 66 | [repo.generic_recipes[name] for name in missing] 67 | ) 68 | 69 | for generic_recipe in ordered_missing: 70 | # Will need to rework toltec_old.repo into something inline and actually easy to work 71 | # with Currently generic_recipe is a Dict[str, Recipe] where the index is the arch. Every 72 | # single entry will have the same path, so we can use that for the name of the generic 73 | # recipe we are actually building. 74 | name = os.path.basename(next(iter(generic_recipe.values())).path) 75 | if missing[name]: 76 | with Builder( 77 | os.path.join(paths.WORK_DIR, name), paths.REPO_DIR 78 | ) as builder: 79 | recipe_bundle = parse_recipe(os.path.join(paths.RECIPE_DIR, name)) 80 | build_matrix: Optional[Dict[str, Optional[List[Package]]]] = None 81 | old_build_matrix = missing[name] 82 | if old_build_matrix: 83 | build_matrix = {} 84 | 85 | for arch, recipes in old_build_matrix.items(): 86 | build_matrix[arch] = [ 87 | recipe_bundle[arch].packages[pkg_name] 88 | for pkg_name in recipe_bundle[arch].packages 89 | ] 90 | builder.make(recipe_bundle, build_matrix, False) 91 | 92 | make_index(paths.REPO_DIR) 93 | 94 | if args.diff: 95 | for name in fetched: 96 | for packages in fetched[name].values(): 97 | for package in packages: 98 | filename = package.filename() 99 | local_path = os.path.join(repo.repo_dir, filename) 100 | os.remove(local_path) 101 | 102 | make_index(paths.REPO_DIR) 103 | repo.make_listing() 104 | repo.make_compatibility() 105 | --------------------------------------------------------------------------------