mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-21 14:30:34 -04:00
Merge branch 'aur' of https://github.com/AnonymusRaccoon/Kyoo
This commit is contained in:
commit
ac25a692fd
@ -87,14 +87,12 @@ namespace Kyoo.Controllers
|
|||||||
|
|
||||||
Pkcs12Store store = new Pkcs12StoreBuilder().Build();
|
Pkcs12Store store = new Pkcs12StoreBuilder().Build();
|
||||||
store.SetKeyEntry("Kyoo_key", new AsymmetricKeyEntry(subjectKeyPair.Private), new [] {new X509CertificateEntry(bouncyCert)});
|
store.SetKeyEntry("Kyoo_key", new AsymmetricKeyEntry(subjectKeyPair.Private), new [] {new X509CertificateEntry(bouncyCert)});
|
||||||
|
|
||||||
using (MemoryStream pfxStream = new MemoryStream())
|
using MemoryStream pfxStream = new MemoryStream();
|
||||||
{
|
store.Save(pfxStream, password.ToCharArray(), random);
|
||||||
store.Save(pfxStream, password.ToCharArray(), random);
|
certificate = new X509Certificate2(pfxStream.ToArray(), password, X509KeyStorageFlags.Exportable);
|
||||||
certificate = new X509Certificate2(pfxStream.ToArray(), password, X509KeyStorageFlags.Exportable);
|
using FileStream fileStream = File.OpenWrite(file);
|
||||||
using FileStream fileStream = File.OpenWrite(file);
|
pfxStream.WriteTo(fileStream);
|
||||||
pfxStream.WriteTo(fileStream);
|
|
||||||
}
|
|
||||||
return certificate;
|
return certificate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,15 +45,15 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.3" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||||
<ProjectReference Include="..\Kyoo.CommonAPI\Kyoo.CommonAPI.csproj" />
|
<ProjectReference Include="../Kyoo.CommonAPI/Kyoo.CommonAPI.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Remove="$(SpaRoot)**" />
|
<Content Remove="$(SpaRoot)**" />
|
||||||
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
|
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules/**" />
|
||||||
<StaticFiles Include="$(SpaRoot)static/**" />
|
<StaticFiles Include="$(SpaRoot)static/**" />
|
||||||
<LoginFiles Include="$(LoginRoot)**" />
|
<LoginFiles Include="$(LoginRoot)**" />
|
||||||
<StaticFiles Include="Views\Login\material-icons.css" />
|
<StaticFiles Include="Views/Login/material-icons.css" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
|
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
|
||||||
@ -104,6 +104,6 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\DatabaseMigrations\Internal" />
|
<Folder Include="Models/DatabaseMigrations/Internal" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using IdentityServer4.Services;
|
using IdentityServer4.Services;
|
||||||
using Kyoo.Api;
|
using Kyoo.Api;
|
||||||
@ -37,7 +38,7 @@ namespace Kyoo
|
|||||||
{
|
{
|
||||||
services.AddSpaStaticFiles(configuration =>
|
services.AddSpaStaticFiles(configuration =>
|
||||||
{
|
{
|
||||||
configuration.RootPath = "wwwroot";
|
configuration.RootPath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "wwwroot");
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddControllers()
|
services.AddControllers()
|
||||||
@ -192,7 +193,7 @@ namespace Kyoo
|
|||||||
|
|
||||||
app.UseSpa(spa =>
|
app.UseSpa(spa =>
|
||||||
{
|
{
|
||||||
spa.Options.SourcePath = "Views/WebClient";
|
spa.Options.SourcePath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "Views/WebClient");
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
cd /opt/kyoo || exit 1
|
|
||||||
dotnet Kyoo.dll
|
|
33
Makefile
33
Makefile
@ -1,33 +0,0 @@
|
|||||||
NEEDED = dotnet \
|
|
||||||
cmake \
|
|
||||||
gcc \
|
|
||||||
node \
|
|
||||||
npm
|
|
||||||
|
|
||||||
ECHO = @echo -e
|
|
||||||
COL = \033[1;36m
|
|
||||||
RED = \033[1;31m
|
|
||||||
NOCOL = \033[0m
|
|
||||||
|
|
||||||
|
|
||||||
all: dependencies
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
@for pkg in $(NEEDED); do \
|
|
||||||
$$pkg --version >> /dev/null 2>&1 || ($(ECHO) "$(RED)ERROR: $$pkg could not be found.$(NOCOL)"; exit 1); \
|
|
||||||
done
|
|
||||||
|
|
||||||
install_kyoo: all
|
|
||||||
$(ECHO) "$(COL)Building the app$(NOCOL)"
|
|
||||||
@if ! [[ $$(mkdir --parent /opt/kyoo) -eq 0 && -w /opt/kyoo ]]; then echo -e "$(RED)You don't have permissions to install Kyoo. Try to re run with sudo privileges.$(NOCOL)"; exit 1; fi
|
|
||||||
dotnet publish -c Release -o /opt/kyoo Kyoo/Kyoo.csproj
|
|
||||||
id -u kyoo &> /dev/null || useradd -rU kyoo
|
|
||||||
chown -R kyoo /opt/kyoo
|
|
||||||
chgrp -R kyoo /opt/kyoo
|
|
||||||
chmod +x /opt/kyoo/kyoo.sh
|
|
||||||
|
|
||||||
install: install_kyoo
|
|
||||||
chown -R kyoo /opt/kyoo
|
|
||||||
chgrp -R kyoo /opt/kyoo
|
|
||||||
|
|
||||||
.PHONY = all dependencies transcoder
|
|
11
install.sh
11
install.sh
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
|
||||||
echo "The script must be run as root since it create an user for kyoo and install the app inside the /opt folder."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
git clone https://github.com/AnonymusRaccoon/Kyoo --recurse
|
|
||||||
cd Kyoo
|
|
||||||
git pull --recurse
|
|
||||||
make install
|
|
5
install/aur/.gitignore
vendored
Normal file
5
install/aur/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Kyoo/
|
||||||
|
src/
|
||||||
|
pkg/
|
||||||
|
kyoo-1.0.0-1-x86_64.pkg.tar.zst
|
||||||
|
|
39
install/aur/PKGBUILD
Normal file
39
install/aur/PKGBUILD
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Maintainer: Zoe Roux <zoe.roux@sdg.moe>
|
||||||
|
pkgname=kyoo
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
epoch=
|
||||||
|
pkgdesc="A media browser."
|
||||||
|
arch=("i686" "x86_64" "armv6h")
|
||||||
|
url="https://github.com/AnonymusRaccoon/Kyoo"
|
||||||
|
license=("GPLv3")
|
||||||
|
groups=()
|
||||||
|
depends=("dotnet-runtime>=3" "aspnet-runtime>=3")
|
||||||
|
makedepends=("dotnet-sdk>=3" "cmake" "gcc" "make" "npm" "git")
|
||||||
|
source=("git+https://github.com/AnonymusRaccoon/Kyoo" #tag=v${pkgver}
|
||||||
|
"kyoo.service"
|
||||||
|
"kyoo.sysusers")
|
||||||
|
sha256sums=("SKIP" "SKIP" "SKIP")
|
||||||
|
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
# cd "Kyoo-$pkgver"
|
||||||
|
cd "Kyoo"
|
||||||
|
git submodule update --init --recursive
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
# cd "Kyoo-$pkgver"
|
||||||
|
cd "Kyoo"
|
||||||
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
dotnet publish -c Release -o "$srcdir/output" Kyoo
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
mkdir -p "$pkgdir/usr/lib"
|
||||||
|
mkdir -p "$pkgdir/var/lib/kyoo"
|
||||||
|
cp -r --no-preserve ownership "$srcdir/output" "$pkgdir/usr/lib/kyoo"
|
||||||
|
mv "$pkgdir/usr/lib/kyoo/appsettings.json" "$pkgdir/var/lib/kyoo/"
|
||||||
|
install -Dm 644 kyoo.service -t "$pkgdir/usr/lib/systemd/system/"
|
||||||
|
install -Dm 644 kyoo.sysusers "$pkgdir/usr/lib/sysusers.d/kyoo.conf"
|
||||||
|
}
|
12
install/aur/kyoo.service
Normal file
12
install/aur/kyoo.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Kyoo Media Server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=kyoo
|
||||||
|
ExecStart=/usr/lib/kyoo/Kyoo /var/lib/kyoo
|
||||||
|
Restart=on-abort
|
||||||
|
TimeoutSec=20
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
1
install/aur/kyoo.sysusers
Normal file
1
install/aur/kyoo.sysusers
Normal file
@ -0,0 +1 @@
|
|||||||
|
u kyoo - "Kyoo Media Server" /var/lib/kyoo
|
1
install/aur/kyoo.tmpfiles
Normal file
1
install/aur/kyoo.tmpfiles
Normal file
@ -0,0 +1 @@
|
|||||||
|
d /var/lib/kyoo 0755 kyoo kyoo
|
Loading…
x
Reference in New Issue
Block a user