summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD25
-rwxr-xr-xmicrosip23
-rw-r--r--microsip.install6
-rw-r--r--microsip.reg7
5 files changed, 55 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0d1cf50e6b7..bdf1d971238 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = microsip
pkgdesc = Open source portable SIP softphone for Windows based on PJSIP stack
pkgver = 3.19.7
- pkgrel = 1
+ pkgrel = 4
url = https://www.microsip.org/
+ install = microsip.install
arch = x86_64
license = GPLv2
makedepends = icoutils
@@ -10,12 +11,15 @@ pkgbase = microsip
depends = wine
depends = lib32-libpulse
depends = lib32-gnutls
+ depends = xorg-xdpyinfo
source = MicroSIP-3.19.7.zip::https://www.microsip.org/downloads/?file=MicroSIP-3.19.7.zip
source = microsip
source = microsip.desktop
+ source = microsip.reg
sha256sums = 3ccf07e88d727681eb338aeb3420b324b5bf614e672bf60e3705137b43fd09bd
- sha256sums = 5aec6639c625bfa73edcdbc90ddbd59e730b31651c9b4249254a54fe63f2563a
+ sha256sums = 63175e29172a06ab6f2474fc03a1c464ef2e6367d0c704e17d437cc4a9ca69d0
sha256sums = d588c2b2e38e12d2be3dfdd9f2a63690293b884c7df240c441e271725b9a2ca2
+ sha256sums = c97cde99004dbee5cb9b05a7b6bad117e5ec63cb1032fa56efdf07a4b27e3c1d
pkgname = microsip
diff --git a/PKGBUILD b/PKGBUILD
index 90781734061..a9e36c4d485 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,33 @@
# Maintainer: Oleksandr Natalenko <oleksandr@natalenko.name>
pkgname=microsip
pkgver=3.19.7
-pkgrel=1
+pkgrel=4
pkgdesc="Open source portable SIP softphone for Windows based on PJSIP stack"
-arch=('x86_64')
+arch=(x86_64)
url="https://www.microsip.org/"
-license=('GPLv2')
-depends=('wine' 'lib32-libpulse' 'lib32-gnutls')
-makedepends=('icoutils' 'imagemagick')
+license=(GPLv2)
+depends=(wine lib32-libpulse lib32-gnutls xorg-xdpyinfo)
+makedepends=(icoutils imagemagick)
+install=${pkgname}.install
source=("MicroSIP-${pkgver}.zip"::"https://www.microsip.org/downloads/?file=MicroSIP-${pkgver}.zip"
"${pkgname}"
- "${pkgname}.desktop")
+ "${pkgname}.desktop"
+ "${pkgname}.reg")
sha256sums=('3ccf07e88d727681eb338aeb3420b324b5bf614e672bf60e3705137b43fd09bd'
- '5aec6639c625bfa73edcdbc90ddbd59e730b31651c9b4249254a54fe63f2563a'
- 'd588c2b2e38e12d2be3dfdd9f2a63690293b884c7df240c441e271725b9a2ca2')
+ '63175e29172a06ab6f2474fc03a1c464ef2e6367d0c704e17d437cc4a9ca69d0'
+ 'd588c2b2e38e12d2be3dfdd9f2a63690293b884c7df240c441e271725b9a2ca2'
+ 'c97cde99004dbee5cb9b05a7b6bad117e5ec63cb1032fa56efdf07a4b27e3c1d')
prepare() {
- cd "${srcdir}"
-
wrestool -x -t 14 microsip.exe >${pkgname}.ico
convert ${pkgname}.ico ${pkgname}.png
+
mv ${pkgname}-0.png ${pkgname}.png
}
package() {
- cd "${srcdir}"
-
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m0644 "License.txt"
install -Dt "${pkgdir}/usr/share/doc/${pkgname}" -m0644 "MicroSIP Website.url"
install -Dt "${pkgdir}/usr/share/${pkgname}" -m0644 "hangup.wav"
@@ -44,6 +44,7 @@ package() {
install -Dt "${pkgdir}/usr/lib/${pkgname}" -m0644 "swscale-4.dll"
install -Dt "${pkgdir}/usr/bin" -m0755 "${pkgname}"
+ install -Dt "${pkgdir}/usr/share/${pkgname}" -m0644 "${pkgname}.reg"
install -Dt "${pkgdir}/usr/share/applications" -m0644 "${pkgname}.desktop"
install -Dt "${pkgdir}/usr/share/icons/hicolor/48x48/apps" -m0644 "${pkgname}.png"
}
diff --git a/microsip b/microsip
index 16bf3f701c7..c55fc9e0da1 100755
--- a/microsip
+++ b/microsip
@@ -3,6 +3,12 @@
__APPNAME=$(basename $0)
__WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local}/wine/${__APPNAME}"
__APPDIR="${__WINEPREFIX}/dosdevices/c:/${__APPNAME}"
+__APPCFG="${XDG_CONFIG_HOME:-$HOME/.config}/${__APPNAME}"
+__APPLOG="${XDG_CACHE_HOME:-$HOME/.cache}/${__APPNAME}"
+__REGFILE="${__APPDIR}/${__APPNAME}.reg"
+__TMPREGFILE=$(mktemp)
+__DPI=$(xdpyinfo -display $DISPLAY | grep -A 2 "screen #0:" | grep "resolution:" | grep -oE '[0-9]+x[0-9]+' | cut -d 'x' -f 1)
+__DPIX=$(printf %08x ${__DPI})
__symlink() {
ln -sf "$1" "${__APPDIR}/${1##*/}"
@@ -25,5 +31,22 @@ __symlink "/usr/lib/${__APPNAME}/avutil-55.dll"
__symlink "/usr/lib/${__APPNAME}/microsip.exe"
__symlink "/usr/lib/${__APPNAME}/swscale-4.dll"
+cp "/usr/share/${__APPNAME}/${__APPNAME}.reg" "${__TMPREGFILE}"
+sed -i "s/{DPI}/${__DPIX}/g" "${__TMPREGFILE}"
+iconv -f utf-8 -t utf-16le "${__TMPREGFILE}" >"${__REGFILE}"
+rm -f "${__TMPREGFILE}"
+WINEPREFIX="${__WINEPREFIX}" regedit "${__REGFILE}"
+rm -f "${__REGFILE}"
+
+mkdir -p "${__APPCFG}"
+touch "${__APPCFG}/Contacts.xml"
+touch "${__APPCFG}/microsip.ini"
+__symlink "${__APPCFG}/Contacts.xml"
+__symlink "${__APPCFG}/microsip.ini"
+
+mkdir -p "${__APPLOG}"
+touch "${__APPLOG}/microsip_log.txt"
+__symlink "${__APPLOG}/microsip_log.txt"
+
WINEPREFIX="${__WINEPREFIX}" wine "${__APPDIR}/microsip.exe"
diff --git a/microsip.install b/microsip.install
new file mode 100644
index 00000000000..ec1e064ea91
--- /dev/null
+++ b/microsip.install
@@ -0,0 +1,6 @@
+post_upgrade() {
+ echo microsip.ini and Contacts.xml are now symlinked from \~/.config/microsip.
+ echo microsip_log.txt is symlinked from \~/.cache/microsip.
+ echo Make sure you backup these files before first launch after upgrade.
+}
+
diff --git a/microsip.reg b/microsip.reg
new file mode 100644
index 00000000000..869c1366d8b
--- /dev/null
+++ b/microsip.reg
@@ -0,0 +1,7 @@
+´╗┐Windows Registry Editor Version 5.00
+
+[HKEY_CURRENT_USER\Control Panel\Desktop]
+"FontSmoothingGamma"=dword:00000578
+"FontSmoothingType"=dword:00000002
+"LogPixels"=dword:{DPI}
+