snapcore / snapd-xdg-open

Software for opening links from snaps in desktop
GNU General Public License v3.0
7 stars 12 forks source link

snapd-xdg-open as a part for a snap package #17

Closed egara closed 8 years ago

egara commented 8 years ago

Hi all.

I'm trying to add snapd-xdg-open as a part for my snap package because I need to use xdg-open from my application but I have problems compiling it.

This is the snapcraft.yaml

name: wallpaperdownloader
version: "2.2"
summary: Download and manage your favorite wallpapers from the Internet
description: WallpaperDownloader is a simple GUI Java based application for downloading and managing wallpapers from the Internet
confinement: strict

apps:
  wallpaperdownloader:
    command: wallpaperdownloader.sh
    plugs: [x11, network-bind, home, browser-support, gsettings]

parts:
  # Pulls the code from the original source (master branch)
  wallpaperdownloader:
    plugin: maven
    source: .
    stage-packages:
      - libglib2.0-bin

  xdg-open:
    plugin: autotools
    source: https://github.com/snapcore/snapd-xdg-open.git

  # It will copy wallpaperdownloader script into /bin/
  # This script contains all the commands needed (sets env variables, launches the jar file...) to
  # execute the application
  exec:
    plugin: copy
    files:
      wallpaperdownloader.sh: bin/wallpaperdownloader.sh

And this is the output when I execute snapcraft:

Building xdg-open 
env NOCONFIGURE=1 ./autogen.sh
configure.ac:13: installing './compile'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
Makefile.am: installing './INSTALL'
Makefile.am: installing './COPYING' using GNU General Public License v3 file
Makefile.am:     Consider adding the COPYING file to the version control system
Makefile.am:     for your code, to avoid questions about which license your project uses
src/Makefile.am: installing './depcomp'
./configure --prefix=
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
./configure: line 3457: syntax error near unexpected token `GIO,'
./configure: line 3457: `PKG_CHECK_MODULES(GIO, gio-2.0)'
Downloading parts list|                                                        
Command '['/bin/sh', '/tmp/tmpe1jwtrvg', './configure', '--prefix=']' returned non-zero exit status 2

What am I missing? Do I need to add external libraries to successfully compile the code or is it another problem?

Thank you very much :)

seb128 commented 8 years ago

you need the glib dev package to build, note that xdg-open is (going to be) provided by ubuntu-core so you shouldn't have to include it yourself like that

zyga commented 8 years ago

Since particular snaps should not bundle xdg-open I will close this issue now.

egara commented 8 years ago

Thank you very much for the information :)

Best,

Eloy