Last active
November 6, 2021 08:55
-
-
Save sukanka/b1d1131af8cf332a17e2fd7e1ef2c8e5 to your computer and use it in GitHub Desktop.
PKGBUILD for OneManager-php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install(){ | |
echo "You have to set your domain in /etc/nginx/conf.d/onemanger.conf manually." | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Maintainer: sukanka<su975853527 [AT] gmail.com> | |
pkgname=onemanager-php-git | |
_pkgname=onemanager | |
pkgver=3.3.r19.g76524fb | |
pkgrel=1 | |
pkgdesc="An index & manager of Onedrive based on serverless." | |
url="https://github.com/qkqpttgf/OneManager-php" | |
arch=('any') | |
license=('unknown') | |
depends=('nginx' 'php-fpm') | |
makedepends=('git') | |
optdepends=("certbot: Enable https for site automatically.") | |
source=("${_pkgname}::git+https://github.com/qkqpttgf/OneManager-php.git" | |
) | |
backup=("var/www/${_pkgname}/web.config" | |
'etc/nginx/conf.d/onemanager.conf' | |
"var/www/${_pkgname}/.data/config.php" | |
) | |
install=onemanager.install | |
sha512sums=('SKIP') | |
pkgver(){ | |
cd ${srcdir}/${_pkgname} | |
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g' | |
} | |
package(){ | |
cd ${srcdir} | |
mkdir -p ${pkgdir}/var/www/${_pkgname} | |
mv ${_pkgname}/{*,.data/,.htaccess} ${pkgdir}/var/www/${_pkgname} | |
mkdir -p ${pkgdir}/etc/nginx/conf.d/ | |
chmod -R 0777 ${pkgdir}/var/www/${_pkgname} | |
echo '''server { | |
server_name dl.example.com; | |
listen 80; | |
root /var/www/onemanager; | |
index index.php; | |
rewrite ^/(?!.well-known)(.*)$ /index.php?/$1 last; | |
location ~ \.php$ { | |
fastcgi_pass unix:/run/php-fpm/php-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
}'''> ${pkgdir}/etc/nginx/conf.d/onemanager.conf | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
注意,你需要在安装完成以后自己修改
/etc/nginx/conf.d/onemanger.conf
,将域名改为你自己的域名。如果需要
https
, 请使用certbot