├── .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 | 
4 | 
5 | [](https://remarkable.com/store/remarkable)
6 | [](https://remarkable.com/store/remarkable-2)
7 | [](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 |
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