Merge pull request #39 from MingcongBai/master
Generate gettext .mo files and installation info update
This commit is contained in:
commit
73ce323271
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.mo
|
10
Makefile
10
Makefile
@ -10,18 +10,26 @@ LN=ln
|
||||
MKDIR=mkdir -p
|
||||
PYTHON=python3
|
||||
RM=rm -f -v
|
||||
MSGFMT=msgfmt
|
||||
|
||||
all:
|
||||
for pofiles in en ja zh_CN zh_TW; do \
|
||||
$(MSGFMT) "po/$$pofiles.po" -o "po/$$pofiles.mo" ; \
|
||||
done
|
||||
|
||||
install:
|
||||
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/danmaku2ass"
|
||||
$(INSTALL) -Dm0755 danmaku2ass.py "$(DESTDIR)$(PREFIX)/share/danmaku2ass/danmaku2ass.py"
|
||||
$(CP) -R locale "$(DESTDIR)$(PREFIX)/share/danmaku2ass/"
|
||||
for locale in en ja zh_CN zh_TW; do \
|
||||
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/locale/$$locale/LC_MESSAGES" ; \
|
||||
$(CP) "po/$$locale.mo" "$(DESTDIR)$(PREFIX)/share/locale/$$locale/LC_MESSAGES/danmaku2ass.mo" ; \
|
||||
done
|
||||
$(MKDIR) "$(DESTDIR)$(PREFIX)/bin"
|
||||
$(LN) -s "$(PREFIX)/share/danmaku2ass/danmaku2ass.py" "$(DESTDIR)$(PREFIX)/bin/danmaku2ass"
|
||||
|
||||
clean:
|
||||
$(RM) -R __pycache__
|
||||
$(RM) po/*.mo
|
||||
|
||||
uninstall:
|
||||
$(RM) -R "$(DESTDIR)$(PREFIX)/bin/danmaku2ass" "$(DESTDIR)$(PREFIX)/share/danmaku2ass"
|
||||
|
5
PKGBUILD
5
PKGBUILD
@ -20,6 +20,11 @@ pkgver() {
|
||||
git log -1 --format="%cd" --date=short | tr -d -
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/danmaku2ass"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/danmaku2ass"
|
||||
make install DESTDIR="$pkgdir" PREFIX=/usr
|
||||
|
14
README.md
14
README.md
@ -15,6 +15,20 @@ First, you will have to get the XML or JSON file from Niconico/Acfun/Bilibili, m
|
||||
|
||||
Then, execute `danmaku2ass`. You can see further instructions below.
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
You may install `danmaku2ass` with the Makefile provided.
|
||||
|
||||
```sh
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
`PREFIX=` is accepted by `make install` for specifying installation prefix.
|
||||
|
||||
A PKGBUILD is also provided.
|
||||
|
||||
Example usage
|
||||
-------------
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user