Skip to content

Commit

Permalink
kawaii-gcc-zh-cn-git: init at r24.fbfb66a
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverOnVenus committed Apr 4, 2024
1 parent 7ed2db1 commit ad9f38c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
32 changes: 32 additions & 0 deletions kawaii-gcc-zh-cn-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Maintainer: RiverOnVenus <[email protected]>
# Contributor: Yufan You <ouuansteve at gmail>

_pkgname=kawaii-gcc
pkgname="$_pkgname-zh-cn-git"
pkgver=r24.fbfb66a
pkgrel=1
provides=("$_pkgname")
pkgdesc='GCCコンパイラーを可愛くしましょう!Make your GCC compiler kawaii. '
arch=(any)
url='https://github.com/Bill-Haku/kawaii-gcc'
license=(GPL3)
makedepends=(git gettext)
install=${pkgname}.install
source=("git+${url}")
sha256sums=('SKIP')

pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
cd "$_pkgname"
make merge-zh
msgfmt gcc-zh.po -o gcc.mo
}

package() {
cd "$_pkgname"
install -Dm644 gcc.mo -t "$pkgdir/usr/share/locale/zh_CN_kawaii/LC_MESSAGES"
}
18 changes: 18 additions & 0 deletions kawaii-gcc-zh-cn-git/kawaii-gcc-zh-cn-git.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

post_install() {
echo ":: This package doesn't replace the existing gcc.mo"
echo " It creates a new folder named \"zh_CN_kawaii\" in the \"/usr/share/locale/\" directory"
echo " gcc.mo in the \"LC_MESSAGES/\" directory"
echo " Need to set the environment variable LANGUAGE makes GCC kawaii"
echo " "
echo " 这个包没有替换原有的 gcc.mo"
echo " 而是在 \"/usr/share/locale/\" 目录下新建了一个 \"zh_CN_kawaii\" 文件夹"
echo " gcc.mo 在 \"LC_MESSAGES/\" 目录中"
echo " 需要设置环境变量 LANGUAGE 让 GCC 变可爱"

}

post_upgrade() {
post_install
}

0 comments on commit ad9f38c

Please sign in to comment.