Need help creating a PKGBUILD


I have a program whose contributor only supplies it in zip and never packages it, so I want to make the package myself

How can I make a correct PKGBUILD so that the system can install this zip and create a desktop file (so that the visual shell can display the shortcut)

My current pkgbuild (not working)

pkgdesc="VTMessenger for Linux x64"
depends=('alsa-lib' 'expat' 'gtk3' 'libgcrypt' 'libgnome-keyring' 'libnotify' 'libxss' 'libxtst' 'nss' 'xdg-utils')

prepare() {
    echo "hello world"

package() {
    mv "${srcdir}"/* "${pkgdir}"

Moderator edit: remove useless screenshot

What program? The source archive type doesn’t matter.

No idea until you link the source code.

hello world

1 Like

You didn’t link to the file in question - just a screenshot …
The url in your PKGBUILD is no good to get the file you want.

Download the file
(and put the download url in the PKGBUILD)

look at what’s inside it
and find out where to put the contents
usually, there are install instructions

translate that into what the PKGBUILD needs to do
where to unpack it to …

without the file
no one knows what it is, what is in it or how it is supposed to be used

and where did you get the “depends” from?
they seem rather specific

Your link leads to Telegram Desktop.
There surely is a PKGBUILD for that already.

Have you read the documentation yet?

How can I make a correct PKGBUILD so that the system can install this zip

The situation is not optimal because the download is only on telegram; I didn’t find a website either, I don’t know if exist some cli programs that can download from there

It is a client for VKontakte?

# Maintainer: 

pkgdesc="Proprietary messenger"
depends=(alsa-lib expat gtk3 libgcrypt libgnome-keyring libnotify libxss libxtst nss xdg-utils)

pkgver() {
  bsdtar -zxf version
  cat version | sed 's/^v//g'

package() {
  install -d "${pkgdir}/opt/vtmessenger"
  bsdtar -xf -C "${pkgdir}/opt/vtmessenger"

  install -d "${pkgdir}/usr/bin"
  ln -s /opt/vtmessenger/vk "${pkgdir}/usr/bin/vtmessenger"

  install -D "${pkgdir}/opt/vtmessenger/icon256.png" "${pkgdir}/usr/share/pixmaps/vtmessenger.png"

  install -d "${pkgdir}/usr/share/applications/"
  cat > ${pkgdir}/usr/share/applications/vtmessenger.desktop << _EOD
[Desktop Entry]
Name=Proprietary messenger
Exec=/opt/vtmessenger/vk %U

I’ve used source_x86_64=("local://") because users need to provide the file and put it alongside the pkgbuild (or in the shared source directory if configured)

A barebone .desktop file is created too

It is an electron program

There isn’t AUR (en) - Packages

context :wink:

This URL suggests some name (vtmsg) - but it leads only to download Telegram Desktop
That’s why I said what I said - there is a PKGBUILD for that.

I’d have thought that they amended the post by now and gave a proper URL for what they wanted - but your assumption of what that is might be correct.

Yes, it is fork of vk-messenger

Problem is there are already vk-messenger in AUR but this fork doesn’t have RPM package - only archive with resources and executable. To launch that I only need to unzip and launch the main file. And yes, fork developer only post archives on telegram, there are no website or something

I just wanted to create a repository where the PKGBUILD and the archive with the program will already be, so users can easily install it

Your solution works perfectly, thank you very much

That was only for test xd

Then why didn’t you say so to begin with?

Why did you not use the vk-messenger AUR PKGBUILD as a template and change the source URL?

Please be clear and concise. See How to Post. Provide more information and you’ll receive more detailed and educated answers in your replies. Making us guess wastes the time of volunteers.

Give, and it shall be given to you. A good measure, pressed down and shaken together and running over shall be put into your lap. For with the same measure with which you measure, it shall be measured back to you.

– Luqas (Luke) 6:38 TS2009

Yes, I’m aware of that. :wink:

I actually did that. Look at source PKGBUILD and mine - they are same

I realized that a lot of details were missing, henceforth I will write more information. Thanks again for your help

by the way, you’re welcome mark the topic as solved

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.