diff --git a/.travis.yml b/.travis.yml index 64d3a41..d8a8ba3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ env: - DISTRO=fedora - DISTRO=archlinux - DISTRO=opensuse - - DISTRO=ubuntu + - DISTRO=ubuntu-xenial script: - ./extra/travis-build "${DISTRO}" diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index a66e4c8..0000000 --- a/Makefile.am +++ /dev/null @@ -1,157 +0,0 @@ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# AUTHORS -# Maciek Borzecki -# - -# location of *.desktop file, usually /usr/share/applications -applicationsdir = $(datadir)/applications - -applications_DATA = \ - mconnect.desktop - -mconnectdatadir = $(datadir)/mconnect - -mconnectdata_DATA = \ - mconnect.conf - -bin_PROGRAMS = \ - mconnect \ - mconnectctl - -noinst_PROGRAMS = \ - test-mconn-crypt - -noinst_LTLIBRARIES = - -VALAFLAGS = \ - --no-color \ - -g \ - --vapidir=vapi \ - --pkg=gio-2.0 \ - --pkg=gio-unix-2.0 \ - --pkg=json-glib-1.0 \ - --pkg=gee-0.8 \ - --pkg=libnotify \ - --pkg=posix \ - --pkg=gdk-3.0 \ - --pkg=atspi-2 \ - --pkg=gnutls \ - --vapidir=src/crypt - -TESTS = \ - test-mconn-crypt - -#------------------------------------------------------------- - -mconnect_SOURCES = \ - src/mconnect/main.vala \ - src/mconnect/discovery.vala \ - src/mconnect/packet.vala \ - src/mconnect/device.vala \ - src/mconnect/discovereddevice.vala \ - src/mconnect/device-proxy.vala \ - src/mconnect/devicemanager.vala \ - src/mconnect/devicemanager-proxy.vala \ - src/mconnect/devicechannel.vala \ - src/mconnect/core.vala \ - src/mconnect/packethandlerinterface.vala \ - src/mconnect/packethandlerinterface-proxy.vala \ - src/mconnect/packethandlers.vala \ - src/mconnect/packethandlers-proxy.vala \ - src/mconnect/notification.vala \ - src/mconnect/battery.vala \ - src/mconnect/battery-proxy.vala \ - src/mconnect/telephony.vala \ - src/mconnect/mousepad.vala \ - src/mconnect/ping.vala \ - src/mconnect/ping-proxy.vala \ - src/mconnect/config.vala \ - src/mconnect/application.vala \ - src/mconnect/utils.vala \ - src/mconnect/property-proxy.vala \ - src/crypt/certificate.vala - -mconnect_LDADD = \ - $(MCONNECT_LIBS) - -mconnect_CFLAGS = \ - $(MCONNECT_CFLAGS) \ - -I$(top_srcdir)/src/crypt - -#------------------------------------------------------------- - -test_mconn_crypt_SOURCES = \ - src/crypt/certificate.vala \ - test/mconn-crypt-vala-test.vala - -test_mconn_crypt_LDADD = \ - $(MCONNECT_LIBS) - -test_mconn_crypt_CFLAGS = \ - $(MCONNECT_CFLAGS) - -test_mconn_crypt_VALAFLAGS = \ - --pkg=gio-2.0 \ - --pkg=posix \ - --pkg=gnutls - -#------------------------------------------------------------- - -mconnectctl_SOURCES = \ - src/mconnectctl/main.vala - -mconnectctl_LDADD = \ - $(MCONNECT_LIBS) - -mconnectctl_CFLAGS = \ - $(MCONNECT_CFLAGS) - - -#------------------------------------------------------------- - -# configure will expand bindir to ${exec_prefix}/bin, we want the -# whole thing, that's why mconnect.desktop is generated here and not -# in configure -do_desktop_subst = sed -e 's,[@]bindir[@],${bindir},g' -mconnect.desktop: mconnect.desktop.in - $(do_desktop_subst) < $< > $@ - -#------------------------------------------------------------- - -REV ?= HEAD - -git-source-dist: - gitsha=`git rev-list $(REV) -1`; \ - git archive --prefix=mconnect-$${gitsha}/ $(REV) | \ - gzip -c > mconnect-$${gitsha}.tar.gz - -#------------------------------------------------------------- - -run-gdb: gdb-script install - gdb -x gdb-script - -.PHONY: run-gdb - -gdb-script: gdb-script.in - sed -e 's,[@]bindir[@],${bindir},g' < $< > $@ - -#------------------------------------------------------------- - -GEN_FROM_VALA = $(filter %.vala,$(mconnect_SOURCES) $(test_mconn_crypt_SOURCES)) -BUILT_SOURCES = \ - mconnect.desktop \ - $(GEN_FROM_VALA:.vala=.c) - -CLEANFILES = $(BUILT_SOURCES) diff --git a/configure.ac b/configure.ac deleted file mode 100644 index cb79a33..0000000 --- a/configure.ac +++ /dev/null @@ -1,60 +0,0 @@ -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# AUTHORS -# Maciek Borzecki -# -AC_PREREQ(2.61) -AC_INIT([mconnect], [0.1.0], [maciek.borzecki@gmail.com]) -AC_CONFIG_SRCDIR([src/mconnect/main.vala]) -AC_CONFIG_AUX_DIR([.]) -AC_PROG_MAKE_SET -AM_PROG_LIBTOOL -AM_INIT_AUTOMAKE([tar-pax foreign subdir-objects]) -AM_SILENT_RULES([yes]) - -AM_MAINTAINER_MODE - -# Checks for header files. -# AC_HEADER_STDC -# AC_CHECK_HEADERS([stdlib.h]) - -# Checks for typedefs, structures, and compiler characteristics. -# AC_C_CONST - -# Checks for programs. -AC_PROG_CC -AM_PROG_VALAC([0.7.0]) -AC_PROG_INSTALL - -PKG_CHECK_MODULES(MCONNECT, [glib-2.0, - gobject-2.0, - gobject-introspection-1.0 - gio-2.0, - gio-unix-2.0, - json-glib-1.0, - gee-0.8, - libnotify - gdk-3.0 - atspi-2 - gnutls - ]) -AC_SUBST(MCONNECT_CFLAGS) -AC_SUBST(MCONNECT_LIBS) - -# Files to generate -AC_CONFIG_FILES([Makefile]) - -# Output -AC_OUTPUT diff --git a/extra/install-tree b/extra/install-tree new file mode 100644 index 0000000..3574526 --- /dev/null +++ b/extra/install-tree @@ -0,0 +1,13 @@ +. +`-- [drwxr-xr-x] usr + `-- [drwxr-xr-x] local + |-- [drwxr-xr-x] bin + | |-- [-rwxr-xr-x] mconnect + | `-- [-rwxr-xr-x] mconnectctl + `-- [drwxr-xr-x] share + |-- [drwxr-xr-x] applications + | `-- [-rw-rw-r--] mconnect.desktop + `-- [drwxr-xr-x] mconnect + `-- [-rw-r--r--] mconnect.conf + +6 directories, 4 files diff --git a/extra/travis-build b/extra/travis-build index 8bbb102..455bcaf 100755 --- a/extra/travis-build +++ b/extra/travis-build @@ -27,9 +27,7 @@ deps_fedora() { dnf install --best -y --refresh \ - automake \ - autoconf \ - libtool \ + meson \ pkgconfig \ gcc \ vala \ @@ -40,34 +38,32 @@ deps_fedora() { libnotify-devel \ at-spi2-core-devel \ gtk3-devel \ - glib-networking + glib-networking \ + tree } deps_opensuse() { zypper install -y \ - make \ - automake \ - autoconf \ - libtool \ - pkgconfig \ - gcc \ - vala \ - gobject-introspection-devel \ - json-glib-devel \ - libgee-devel \ - gnutls-devel \ - libnotify-devel \ - at-spi2-core-devel \ - gtk3-devel \ - glib-networking + make \ + meson \ + pkgconfig \ + gcc \ + vala \ + gobject-introspection-devel \ + json-glib-devel \ + libgee-devel \ + gnutls-devel \ + libnotify-devel \ + at-spi2-core-devel \ + gtk3-devel \ + glib-networking \ + tree } deps_archlinux() { pacman -Syu --noconfirm \ base-devel \ - autoconf \ - automake \ - libtool \ + meson \ pkg-config \ gcc \ vala \ @@ -79,22 +75,24 @@ deps_archlinux() { at-spi2-core \ gtk3 \ gnutls \ - glib-networking + glib-networking \ + tree } -deps_ubuntu() { +deps_ubuntu_xenial() { apt-get update && \ - apt-get install -y \ - autoconf \ - libtool \ - valac \ - libgirepository1.0-dev \ - libjson-glib-dev \ - libgee-0.8-dev \ - libgnutls28-dev \ - libnotify-dev \ - libgtk-3-dev \ - glib-networking + apt-get install -y \ + meson/xenial-backports \ + pkg-config \ + valac \ + libgirepository1.0-dev \ + libjson-glib-dev \ + libgee-0.8-dev \ + libgnutls28-dev \ + libnotify-dev \ + libgtk-3-dev \ + glib-networking \ + tree } install_deps() { @@ -108,8 +106,8 @@ install_deps() { archlinux) deps_archlinux ;; - ubuntu) - deps_ubuntu + ubuntu-xenial) + deps_ubuntu_xenial ;; *) echo "unsupported distro $1" @@ -118,11 +116,16 @@ install_deps() { } build() { - autoreconf -if && \ - ./configure && \ - make && \ - make check && \ - make install + set -e + mkdir build && \ + cd build && \ + meson .. && \ + ninja && \ + ninja test + + DESTDIR=$PWD/install-dir ninja install + (cd install-dir; LC_ALL=C tree -pan . > ../current-tree) + diff -up ../extra/install-tree current-tree } build_in_container() { @@ -142,8 +145,8 @@ spin_container() { opensuse) DOCKER_IMG=opensuse:tumbleweed ;; - ubuntu) - DOCKER_IMG=ubuntu:latest + ubuntu-xenial) + DOCKER_IMG=ubuntu:xenial ;; *) echo "unsupported distro $1"