README.md 954 Bytes
Newer Older
Carlo Landmeter's avatar
Carlo Landmeter committed
1
# aports-turbo
Carlo Landmeter's avatar
Carlo Landmeter committed
2

Carlo Landmeter's avatar
Carlo Landmeter committed
3 4
Alpine Linux package database written in Lua.

Carlo Landmeter's avatar
Carlo Landmeter committed
5
This application makes use of the [Turbo](http://turbolua.org) (Lua) framework.
Carlo Landmeter's avatar
Carlo Landmeter committed
6

7
On Alpine Linux it should be enough to install turbo and deps by: 
Carlo Landmeter's avatar
Carlo Landmeter committed
8

9
```
10
apk add luajit lua5.1 lua-turbo lua-sqlite lua-lustache lua-socket lua-lzmq lua-gversion
11
```
Carlo Landmeter's avatar
Carlo Landmeter committed
12

13 14
Copy `config.sample.lua` to `config.lua` and edit it.
You can start the application by starting `./aports.lua` or on Alpine Linux with turbo's init.d (see `conf.d/turbo` for settings).
Carlo Landmeter's avatar
Carlo Landmeter committed
15 16 17

#### Creating/updating the database

18
aports-turbo uses an SQLite database which is generated (check config to init tables) and updated by `import.lua` found in the tools directory. `import.lua` needs to be run from the root of aports-turbo project. You can for example run it from cron by creating a file like:
Carlo Landmeter's avatar
Carlo Landmeter committed
19

20
/etc/periodic/15min/alpine-turbo:
21

Carlo Landmeter's avatar
Carlo Landmeter committed
22 23
```shell
#!/bin/sh
Carlo Landmeter's avatar
Carlo Landmeter committed
24

Carlo Landmeter's avatar
Carlo Landmeter committed
25
webdir="/var/www/aports-turbo"
Carlo Landmeter's avatar
Carlo Landmeter committed
26

Carlo Landmeter's avatar
Carlo Landmeter committed
27
cd $webdir && luajit tools/import.lua > /dev/null 2>&1
rofl0r's avatar
rofl0r committed
28
```