Enable cirrus continous integration task for linux
authorSofian Brabez <sbz@FreeBSD.org>
Tue, 16 Feb 2021 14:46:41 +0000 (14:46 +0000)
committerSofian Brabez <sbz@FreeBSD.org>
Tue, 16 Feb 2021 14:46:41 +0000 (14:46 +0000)
.cirrus.yml
GNUMakefile

index cda7e6183dd1c8ae5f6d4e30397e2d3b7734a87a..5e85afc95f38f714799b49931f5273b406388704 100644 (file)
@@ -1,3 +1,6 @@
+env:
+  CIRRUS_CLONE_DEPTH: 1
+
 freebsd_task:
   freebsd_instance:
     image_family: freebsd-13-0-snap
@@ -9,3 +12,13 @@ freebsd_task:
     - make install
   check_script:
     - make test
+
+linux_task:
+  container:
+    image: ubuntu:latest
+
+  install_script:
+    - apt update && apt install -y build-essential gzip
+  script:
+    - make -f GNUMakefile
+    - make -f GNUMakefile install
index ee32005910f6af1ff6aee42f13c629daaebb3c6f..e8a75eaad17d8990ff7869902492578ef6f7143f 100644 (file)
@@ -3,6 +3,7 @@ CFLAGS?=        -O2 -g -pipe -D_DEFAULT_SOURCE -Wincompatible-pointer-types
 SRCS=  elf.c elfdbg.c compat.c
 OBJS=  ${SRCS:.c=.o}
 PREFIX?=       /usr/local
+MANPREFIX?=    /usr/share/man
 
 all: elfdbg
 
@@ -12,9 +13,13 @@ elfdbg: ${OBJS}
 .c.o:
        ${CC} ${CFLAGS} -c $<
 
-install: elfdbg
+install: elfdbg install-man
        install -m 755 elfdbg ${DESTDIR}${PREFIX}/bin/
 
+install-man:
+       gzip elfdbg.1 || /usr/bin/true
+       install -m 644 elfdbg.1.gz ${MANPREFIX}/man1/
+
 install-strip: elfdbg
        install -s -m 755 elfdbg ${DESTDIR}${PREFIX}/bin/