blob: 55489ae2d6176ea56e99b3e90e5fbb7e7e0d3dcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=notepad--
_pkgname=NotePad--
pkgver=2.20
pkgrel=1
pkgdesc="A text editor written in C++,to eventually surpass Notepad++.一个国产跨平台,轻量级的文本编辑,是替换notepad++的一种选择.其内置强大的代码对比功,让你丢掉付费的beyond compare."
arch=('x86_64')
url="https://gitee.com/cxasm/notepad--"
_ghurl="https://github.com/cxasm/notepad--"
license=('GPL-3.0-or-later')
provides=("${pkgname}")
depends=(
'glibc'
'gcc-libs'
'qt5-base'
)
makedepends=(
'gcc'
'cmake'
'ninja'
'qt5-tools'
'qt5-xmlpatterns'
'qscintilla-qt5'
)
source=(
"${pkgname}-${pkgver}.tar.gz::${_ghurl}/archive/refs/tags/notepad-v${pkgver}.tar.gz"
)
sha256sums=('36f410affd895107106f6f2ab01a75c095ba109a6a311aaf82955bce9dfabd59')
build() {
cd "${srcdir}/${pkgname}-notepad-v${pkgver}"
sed -i "s/intptr_t/__intptr_t/g" src/qscint/src/xmlMatchedTagsHighlighter.cpp
sed -i "s/intptr_t/__intptr_t/g" src/qscint/src/xmlMatchedTagsHighlighter.h
cmake -S . -Bbuild -GNinja -DCMAKE_BUILD_TYPE=None -W no-dev
ninja -C build
sed -e "
s/${_pkgname} %F/${pkgname} %F/g
s/\/usr\/share\/icons\/hicolor\/128x128\/apps\/${pkgname}.png/${pkgname}/g
" -i src/linux/usr/share/applications/"${_pkgname}".desktop
sed -i "s/io.gitee.cxasm.${pkgname}/${pkgname}/g" src/linux/usr/share/metainfo/io.gitee.cxasm."${pkgname}".metainfo.xml
}
package() {
install -Dm755 "${srcdir}/${pkgname}-notepad-v${pkgver}/build/${_pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 "${srcdir}/${pkgname}-notepad-v${pkgver}/src/linux/usr/share/applications/${_pkgname}.desktop" \
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
_icon_sizes=(32x32 64x64 128x128)
for _icons in "${_icon_sizes[@]}";do
install -Dm644 "${srcdir}/${pkgname}-notepad-v${pkgver}/src/linux/usr/share/icons/hicolor/${_icons}/apps/${pkgname}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
install -Dm644 "${srcdir}/${pkgname}-notepad-v${pkgver}/src/linux/usr/share/metainfo/io.gitee.cxasm.${pkgname}.metainfo.xml" \
"${pkgdir}/usr/share/metainfo/${pkgname}.metainfo.xml"
}
|