mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-02 09:52:18 +00:00
add: voicevox (#591)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
From 6b8c81d1d4ac0ac562b69e7f8164c8a92dafe13a Mon Sep 17 00:00:00 2001
|
||||
From: windowsboy111 <wboy111@outlook.com>
|
||||
Date: Mon, 19 Jun 2023 10:33:20 +0800
|
||||
Subject: [PATCH] feat: add repository entry in package.json
|
||||
|
||||
---
|
||||
package.json | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/package.json b/package.json
|
||||
index 622756a..b3d3dfa 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
+ "repository": "github:VOICEVOX/voicevox",
|
||||
"name": "voicevox",
|
||||
"version": "999.999.999",
|
||||
"author": "Hiroshiba Kazuyuki",
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "voicevox.spec"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// let v = gh("VOICEVOX/voicevox");
|
||||
// rpm.version(v);
|
||||
// let engines = get(`https://raw.githubusercontent.com/VOICEVOX/voicevox/${v}/package.json`).json().engines;
|
||||
// rpm.define("nodev", find(">=([\\d.]+)", engines.node, 1));
|
||||
// rpm.define("nodev", find(">=([\\d.]+)", engines.npm, 1));
|
||||
let v = "0.14.7";
|
||||
let engines = get(`https://raw.githubusercontent.com/VOICEVOX/voicevox/${v}/package.json`).json().engines;
|
||||
print(find(">=([\\d.]+)", engines.node, 1));
|
||||
print(find(">=([\\d.]+)", engines.npm, 1));
|
||||
@@ -0,0 +1,60 @@
|
||||
%global nodev 16.17.0
|
||||
%global npmv 8.11.0
|
||||
%define debug_package %nil
|
||||
|
||||
Name: voicevox
|
||||
Version: 0.14.7
|
||||
Release: 1%?dist
|
||||
Summary: Free Japanese text-to-speech editor
|
||||
License: LGPL-3.0
|
||||
URL: https://voicevox.hiroshiba.jp
|
||||
Source0: https://github.com/VOICEVOX/voicevox/archive/refs/tags/%version.tar.gz
|
||||
# requires specific node and npm version
|
||||
%ifarch x86_64
|
||||
%global a x64
|
||||
%elifarch aarch64
|
||||
%global a arm64
|
||||
%endif
|
||||
Source1: https://nodejs.org/download/release/v%nodev/node-v%nodev-linux-%a.tar.xz
|
||||
Patch0: 0001-feat-add-repository-entry-in-package.json.patch
|
||||
|
||||
%description
|
||||
VOICEVOX is a free Japanese text-to-speech software with medium output quality.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation files for voicevox (Japanese)
|
||||
|
||||
%description doc
|
||||
%summary.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
tar xf %SOURCE1
|
||||
PATH="$PATH:$PWD/node-v%nodev-linux-%a/bin/"
|
||||
npx npm@%npmv i
|
||||
|
||||
%build
|
||||
PATH="$PATH:$PWD/node-v%nodev-linux-%a/bin/"
|
||||
npx browserslist@latest --update-db
|
||||
PATH="$PATH:$PWD/node-v%nodev-linux-%a/bin/"
|
||||
npm run electron:build
|
||||
|
||||
%install
|
||||
rm dist_electron/linux-unpacked/README.txt # dummy
|
||||
mkdir -p %buildroot%_datadir/%name %buildroot%_bindir %buildroot%_docdir/%name/res
|
||||
mv dist_electron/linux-unpacked/* %buildroot%_datadir/%name/
|
||||
ln -s %_datadir/%name/%name %buildroot%_bindir/%name
|
||||
install -Dm644 docs/*.md %buildroot%_docdir/%name/
|
||||
install -Dm644 docs/res/* %buildroot%_docdir/%name/res/
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE LGPL_LICENSE
|
||||
%_bindir/%name
|
||||
%_datadir/%name/
|
||||
|
||||
%files doc
|
||||
%doc %_docdir/%name/
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
Reference in New Issue
Block a user