GithubHelp home page GithubHelp logo

nomore201 / gplayweb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matlink/gplayweb

0.0 3.0 0.0 171 KB

GPlayWeb: A Web interface for GPlayCli

License: Other

Makefile 4.67% Python 51.20% Shell 6.47% HTML 37.65%

gplayweb's Introduction

GPlayWeb: A Web interface for GPlayCli

Original work of @matlink forked to use latest versions of fdroid and gplaycli and providing a Dockerfile for easy install.

Docker install (gplayweb + fdroid)

First, install docker.

Then, to use the last version of container on dockerhub:

docker run --name gplayweb -p 127.0.0.1:8888:8888 fxaguessy/gplayweb

You can also build the container yourself

docker build -t gplayweb .

Then run it

docker run --name gplayweb -p 127.0.0.1::8888:8888 gplayweb

To preserve gplayweb and fdroid data, mount a local folder as docker volume:

docker run --name gplayweb -p 127.0.0.1:8888:8888 -v ~/fdroid/:/data/fdroid fxaguessy/gplayweb

Then, you may want to expose your (static) fdroid repo using a nginx container

docker run --name fdroid-nginx -p 8080:80 -v ~/fdroid/repo:/usr/share/nginx/html:ro nginx

As a result, you can access gplayweb on localhost and the fdroid repository on your.ip.address:8080.

Installation (consider using a virtualenv)

For both methods, you'll need those packages

# apt-get install python-dev python-pip libffi-dev

pip method

Use pip install gplayweb to install it. If you got a SandboxViolation for gplaycli, install it before with pip install gplaycli. After that, rename /etc/gplayweb/gplayweb.conf.example to /etc/gplayweb/gplayweb.conf and change parameters.

git method

  • Clone this repo:

      $ git clone https://github.com/fxaguessy/gplayweb
    
  • Install gplayweb requirements with pip :

      $ pip install -r requirements.txt
    
  • Copy gplayweb.conf.example to gplayweb.conf and change the settings (you can comment unwanted lines out with #)

  • If you plan to add compatibility with F-Droid repo, ensure to uncomment the two config variables fdroid_repo_dir and fdroid_exec.

Usage

$ ./gplayweb -h
usage: gplayweb.py [-h] [-c CONF_FILE]

A web interface for GPlayCli

optional arguments:
  -h, --help            show this help message and exit
  -c CONF_FILE, --config CONF_FILE
                        Use a different config file than gplayweb.conf

FDroid Compatibility

Based on https://f-droid.org/wiki/page/Installing_the_Server_and_Repo_Tools python-imaging may be needed to update FDroid repository, don't forget to install it.

  • create user gplayweb : adduser gplayweb --disabled-password

  • go to /opt directory : cd /opt

  • get android SDK : wget https://dl.google.com/android/android-sdk_r24.3.4-linux.tgz

  • untar it : tar xvfz android-sdk_r24.3.4-linux.tgz

  • give it to gplayweb : chown gplayweb android-sdk-linux -R

  • put ANDROID_HOME env variable to your .bashrc : echo export ANDROID_HOME=/opt/android-sdk-linux >> ~/.bashrc

  • put android tools to your PATH variable : echo 'export PATH=$PATH:$ANDROID_HOME/tools' >> ~/.bashrc

  • reload .bashrc : source ~/.bashrc

  • if you don't have java (java -version) : apt-get install openjdk-7-jdk

  • install Android 22 SDK : android update sdk --no-ui -a --filter 4

  • install platform-tools : android update sdk --no-ui --filter platform-tools

  • clone fdroidserver : cd /opt && git clone https://gitlab.com/fdroid/fdroidserver.git && cd fdroidserver

  • install fdroidserver : sudo apt-get install fdroidserver

  • go to the folder where you want to host your fdroid repo : cd /opt/fdroid/

  • give it to gplayweb : chown gplayweb . -R

  • for android aapt to work, you need these packages : apt-get install lib32stdc++6 lib32z1

  • initialize fdroid repo : fdroid init

  • then in /etc/gplayweb/gplayweb.conf :

    folder=/opt/fdroid/repo

    fdroid_repo_dir=/opt/fdroid

    fdroid_exec=/usr/local/bin/fdroid

LSB script

It might still be a bit buggy. Change USER for the user which will run the daemon (gplayweb in this example), and ANDROID_SDK for the path of the android-sdk you have configured earlier (/opt/android-sdk-linux in this example).

$ /etc/init.d/gplayweb {start|stop|restart|status}

Please me hard enough if you want a systemd unit :D

Uninstall

Use pip uninstall gplayweb, and remove conf, templates and static files with rm -rf /etc/gplayweb /usr/share/gplayweb. Should be clean, except python dependancies for gplayweb and gplaycli.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.