nwg-piotr / nwg-menu

MenuStart plugin to nwg-panel, also capable of working standalone
MIT License
67 stars 4 forks source link

automatic installation not working #15

Open AngryPenguinPL opened 2 years ago

AngryPenguinPL commented 2 years ago

Hi, I built nwg-menu package for OpenMandriva and wanted to use automatic file installation, unfortunately it doesn't seem to work. By checking the golang documentation, I noticed that the "go install" option is recommended, but using this option in a .spec file does not generate any files. It seems there is also a "makefile" file - so it would be reasonable to use "%make_install", but the problem is that when trying to install them, the script encounters a permission error:

cd nwg-menu-0.1.1
DEBUG util.py:636:  + '[' 1 -eq 1 ']'
DEBUG util.py:636:  + /usr/bin/make install DESTDIR=/builddir/build/BUILDROOT/nwg-menu-0.1.1-1.x86_64 'INSTALL=/usr/bin/install -p'
DEBUG util.py:636:  mkdir -p /usr/share/nwg-menu
DEBUG util.py:634:  mkdir: cannot create directory '/usr/share/nwg-menu': Permission denied
DEBUG util.py:634:  make: *** [Makefile:13: install] Error 1
DEBUG util.py:634:  error: Bad exit status from /var/tmp/rpm-tmp.edw9Zf (%install)
DEBUG util.py:636:  RPM build errors:
DEBUG util.py:634:      Bad exit status from /var/tmp/rpm-tmp.edw9Zf (%install)

Unfortunately, I do not know the GO language completely, but I wanted to add it for my own use and by the way put the entire stack of NWG * into the OpenMandriva repository but so far I do not see any other method for installing files than manual installation, such as in the Arch package from AUR and the automatic files installation would certainly make it easier to maintain the package in the future.

nwg-piotr commented 2 years ago

mkdir: cannot create directory '/usr/share/nwg-menu': Permission denied

Looks as if you missed sudo before make install, but I know nothing about Mandriva. Maybe you need to use sudo also inside Makefile (line #13)? Actually I don't use Makefile inside AUR PKGBUILD, and I have no idea if it's even possible.

You could also try the pre-compiled binary I attached in Assets. Building the gotk3 library takes ages (17 minutes on my laptop). I started to provide binaries for all my stuff written in golang. See PKGBUILD.