You are not logged in.

#1 2021-03-20 15:55:53

Jhyub
Member
From: Seoul, Korea
Registered: 2021-02-28
Posts: 2

[SOLVED] Writing PKGBUILD for .deb upstream only obtainable by curl

I'm trying to write a PKGBUILD for hancomoffice-hwpviewer. (https://www.hancom.com/cs_center/csDownload.do)
This program doesn't allow repackaging, so I tried to provide an http link as source: https://cdn.hancom.com/pds/hnc/VIE/hanc … -amd64.deb
However, the link only works properly if the header "Referer: https://www.hancom.com/" is given, so I wrote the curl progress on prepare(), which will make checking the deb file as a source fail.
Is there a way to pass curl arguments to source()? or any other way to check if the deb file was successfully downloaded?

# Maintainer: Janghyub Seo <seojanghyeob at gmail dot com>

pkgname=hancomoffice-hwpviewer

pkgver=9.20.0.1573
pkgrel=1

pkgdesc='(주)한글과컴퓨터에서 개발하여 배포하는 한글 전용 뷰어 프로그램입니다.'
arch=('x86_64')
url='https://www.hancom.com/cs_center/csDownload.do'
license=('custom')

# Original dependencies from ubuntu
# libc6(glibc), libcairo2(cairo), libfontconfig1(fontconfig), libfreetype6(freetype2), libgcc(gcc-libs), libgdk-pixbuf(gdk-pixbuf2), libglib(glib2), libgtk-3(gtk3), libwebkitgtk-3(webkitgtk), libstdc++6(gcc-libs), libxml2(libxml2), gvfs(gvfs), zlib1g(zlib)
depends=('glibc' 'cairo' 'fontconfig' 'freetype2' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'gtk3' 'webkitgtk' 'libxml2' 'gvfs' 'zlib' 'curl')

# Curl deb from hancom.com
prepare() {
    curl  -o "$pkgname-$pkgver.deb" \
     -H "Referer: https://www.hancom.com/" \
     https://cdn.hancom.com/pds/hnc/VIE/hancomoffice-hwpviewer-Ubuntu-amd64.deb
}

Last edited by Jhyub (2021-03-20 23:14:11)

Offline

#2 2021-03-20 21:23:48

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Writing PKGBUILD for .deb upstream only obtainable by curl

hancomoffice-hwpviewer appears to be proprietary software ?

The common solution for such files on archlinux is to add them in source array but let the user download the file themselves .

Check https://wiki.archlinux.org/index.php/No … guidelines


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-03-20 21:28:13

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] Writing PKGBUILD for .deb upstream only obtainable by curl

There is already an AUR package:
https://aur.archlinux.org/packages/hwpviewer/


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-03-20 23:11:43

Jhyub
Member
From: Seoul, Korea
Registered: 2021-02-28
Posts: 2

Re: [SOLVED] Writing PKGBUILD for .deb upstream only obtainable by curl

progandy wrote:

There is already an AUR package:
https://aur.archlinux.org/packages/hwpviewer/

oh thanks

Offline

Board footer

Powered by FluxBB