~fluix/tilde

22104c9833acd6dc82314099b97c78e8d709218f — Steven Guikal 4 months ago 1a48afa
Add package installation and building
5 files changed, 89 insertions(+), 3 deletions(-)

A .build.yml
M LICENSE
A LICENSES/BSD-3-Clause.txt
A setup.py
M templates/base.html
A .build.yml => .build.yml +50 -0
@@ 0,0 1,50 @@
# SPDX-FileCopyrightText: 2022 Steven Guikal <void@fluix.one>
# SPDX-FileCopyrightText: 2017 Drew DeVault <sir@cmpwn.com>
#
# SPDX-License-Identifier: BSD-3-Clause

image: alpine/3.15
repositories:
  cats.sh: >
    https://mirror.cats.sh/alpine/v3.15/cats.sh/
    https://mirror.cats.sh/alpine/alpine%40cats.sh.rsa.pub
    alpine@cats.sh.rsa.pub
packages:
  - openssl
  - rsync
environment:
  remote: deploy@mirror.cats.sh
  remote_path: /var/www/mirror.cats.sh/alpine
  project: tilde
  master: deploy@cats.sh
secrets:
  - f87c0d68-bd08-404b-9e3f-f595e976ffca # ssh deploy key
  - eb47f476-e5cd-4fbe-8f59-a4bee523793e # package signing key
sources:
  - https://git.sr.ht/~fluix/mirror.cats.sh-apk
  - https://git.sr.ht/~fluix/tilde
tasks:
  - archive: |
      cd $project
      pkgver=$(~/mirror.cats.sh-apk/pkgkit pkgver)
      echo "pkgver=$pkgver" >> ~/.buildenv
      git archive \
        -o ~/mirror.cats.sh-apk/cats.sh/$project/$project-$pkgver.tar.gz \
        --prefix=$project-$pkgver/ HEAD
  - pkgkit: |
      cd mirror.cats.sh-apk
      ./pkgkit add-repo -s cats.sh ~/.abuild/alpine@cats.sh.rsa
      cd cats.sh/$project
      sed -e 's?::https://git.sr.ht/.*pkgname/archive.*??g' -i APKBUILD
  - package: |
      cd mirror.cats.sh-apk
      ./pkgkit build -cuv "$pkgver" "$project"
      cd ~/$project
      git describe --exact-match HEAD || complete-build
  - publish: |
      cd mirror.cats.sh-apk
      echo "StrictHostKeyChecking=no" >> ~/.ssh/config
      ./pkgkit upload "$remote" "$remote_path" "$project"
  - deploy: |
      ssh $master doas apk upgrade -U
      ssh $master doas service uwsgi reload

M LICENSE => LICENSE +2 -2
@@ 1,5 1,5 @@
This project uses the REUSE licensing specification which is available here:
https://reuse.software/

Overall, CC-BY-SA-4.0 is used for written content and AGPL-3.0-only is used for
code. See file headers or use the `reuse` CLI tool for exact licenses.
Generally, CC-BY-SA-4.0 is used for written content and AGPL-3.0-only is used
for code. See file headers or use the `reuse` CLI tool for exact licenses.

A LICENSES/BSD-3-Clause.txt => LICENSES/BSD-3-Clause.txt +11 -0
@@ 0,0 1,11 @@
Copyright (c) <year> <owner>. 

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

A setup.py => setup.py +25 -0
@@ 0,0 1,25 @@
# SPDX-FileCopyrightText: 2022 Steven Guikal <void@fluix.one>
#
# SPDX-License-Identifier: CC0-1.0

from setuptools import find_packages, setup

setup(
    name="tilde",
    version="0.1.0",
    description="Tilde site and service suite for friends to come together.",
    author="Steven Guikal",
    author_email="void@fluix.one",
    url="https://git.sr.ht/~fluix/tilde",
    license="AGPL-3.0",
    packages=find_packages(),
    include_package_data=True,
    install_requires=[
        "flask",
        "flask-login",
        "click",
        "flask-sqlalchemy",
        "wtforms",
        "email-validator",
    ],
)

M templates/base.html => templates/base.html +1 -1
@@ 69,7 69,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
      </nav>
      <p>
        &copy; 2021 Steven Guikal.
        <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSE">Licensed</a> under <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/AGPL-3.0-only.txt">AGPL-3.0-only</a>, <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/CC-BY-SA-4.0.txt">CC-BY-SA-4.0</a>, and <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/CC0-1.0.txt">CC0-1.0</a>.
        <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSE">Licensed</a> under <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/AGPL-3.0-only.txt">AGPL</a>, <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/BSD-3-Clause.txt">BSD 3-Clause</a>, <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/CC-BY-SA-4.0.txt">CC BY-SA</a>, and <a href="https://git.sr.ht/~fluix/tilde/tree/master/item/LICENSES/CC0-1.0.txt">CC0</a>.
        <a href="https://sr.ht/~fluix/tilde/">View project</a>.
      </p>
    </footer>