Browse Source

build: drop autotools

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
bboozzoo/meson-only
Maciek Borzecki 7 years ago
parent
commit
0ea5f7650a
5 changed files with 61 additions and 262 deletions
  1. +1
    -1
      .travis.yml
  2. +0
    -157
      Makefile.am
  3. +0
    -60
      configure.ac
  4. +13
    -0
      extra/install-tree
  5. +47
    -44
      extra/travis-build

+ 1
- 1
.travis.yml View File

@ -6,7 +6,7 @@ env:
- DISTRO=fedora - DISTRO=fedora
- DISTRO=archlinux - DISTRO=archlinux
- DISTRO=opensuse - DISTRO=opensuse
- DISTRO=ubuntu
- DISTRO=ubuntu-xenial
script: script:
- ./extra/travis-build "${DISTRO}" - ./extra/travis-build "${DISTRO}"

+ 0
- 157
Makefile.am View File

@ -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 <maciek.borzecki (at] gmail.com>
#
# 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)

+ 0
- 60
configure.ac View File

@ -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 <maciek.borzecki (at] gmail.com>
#
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

+ 13
- 0
extra/install-tree View File

@ -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

+ 47
- 44
extra/travis-build View File

@ -27,9 +27,7 @@
deps_fedora() { deps_fedora() {
dnf install --best -y --refresh \ dnf install --best -y --refresh \
automake \
autoconf \
libtool \
meson \
pkgconfig \ pkgconfig \
gcc \ gcc \
vala \ vala \
@ -40,34 +38,32 @@ deps_fedora() {
libnotify-devel \ libnotify-devel \
at-spi2-core-devel \ at-spi2-core-devel \
gtk3-devel \ gtk3-devel \
glib-networking
glib-networking \
tree
} }
deps_opensuse() { deps_opensuse() {
zypper install -y \ 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() { deps_archlinux() {
pacman -Syu --noconfirm \ pacman -Syu --noconfirm \
base-devel \ base-devel \
autoconf \
automake \
libtool \
meson \
pkg-config \ pkg-config \
gcc \ gcc \
vala \ vala \
@ -79,22 +75,24 @@ deps_archlinux() {
at-spi2-core \ at-spi2-core \
gtk3 \ gtk3 \
gnutls \ gnutls \
glib-networking
glib-networking \
tree
} }
deps_ubuntu() {
deps_ubuntu_xenial() {
apt-get update && \ 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() { install_deps() {
@ -108,8 +106,8 @@ install_deps() {
archlinux) archlinux)
deps_archlinux deps_archlinux
;; ;;
ubuntu)
deps_ubuntu
ubuntu-xenial)
deps_ubuntu_xenial
;; ;;
*) *)
echo "unsupported distro $1" echo "unsupported distro $1"
@ -118,11 +116,16 @@ install_deps() {
} }
build() { 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() { build_in_container() {
@ -142,8 +145,8 @@ spin_container() {
opensuse) opensuse)
DOCKER_IMG=opensuse:tumbleweed DOCKER_IMG=opensuse:tumbleweed
;; ;;
ubuntu)
DOCKER_IMG=ubuntu:latest
ubuntu-xenial)
DOCKER_IMG=ubuntu:xenial
;; ;;
*) *)
echo "unsupported distro $1" echo "unsupported distro $1"


Loading…
Cancel
Save