2014-11-04 14:36:49 +00:00
|
|
|
|
2022-07-16 05:31:43 +00:00
|
|
|
VERSION=0.11.0
|
2014-11-04 14:36:49 +00:00
|
|
|
|
2016-02-28 19:40:26 +00:00
|
|
|
SRC_VERSION=master
|
|
|
|
|
2014-11-04 14:36:49 +00:00
|
|
|
outbox:
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
clean-outbox: outbox
|
|
|
|
rm -f outbox/*
|
|
|
|
|
2016-08-06 22:23:23 +00:00
|
|
|
PACKAGE_URLS = \
|
2022-05-11 16:06:02 +00:00
|
|
|
https://www.libarchive.org/downloads/libarchive-3.6.1.tar.gz \
|
2016-08-06 22:23:23 +00:00
|
|
|
https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz \
|
2022-05-11 16:06:02 +00:00
|
|
|
ftp://ftp.gnu.org/gnu/ncurses/ncurses-6.3.tar.gz \
|
|
|
|
https://sourceforge.net/projects/pcre/files/pcre/8.42/pcre-8.42.tar.gz \
|
2017-03-16 00:01:58 +00:00
|
|
|
https://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz \
|
2022-05-11 16:06:02 +00:00
|
|
|
https://zlib.net/zlib-1.2.12.tar.gz \
|
2020-09-18 15:57:29 +00:00
|
|
|
https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz \
|
2022-08-11 14:18:43 +00:00
|
|
|
https://www.sqlite.org/2022/sqlite-autoconf-3390200.tar.gz \
|
2018-01-22 19:06:39 +00:00
|
|
|
https://www.openssl.org/source/openssl-1.0.2n.tar.gz \
|
2020-04-21 05:50:57 +00:00
|
|
|
https://www.libssh2.org/download/libssh2-1.9.0.tar.gz \
|
2022-08-11 14:18:43 +00:00
|
|
|
https://curl.se/download/curl-7.84.0.tar.gz \
|
2021-01-12 05:22:46 +00:00
|
|
|
https://tukaani.org/xz/xz-5.2.5.tar.gz
|
2016-08-06 22:23:23 +00:00
|
|
|
|
2020-09-14 13:27:12 +00:00
|
|
|
.PHONY: linux freebsd pkger download-pkgs musl
|
2014-11-04 14:36:49 +00:00
|
|
|
|
2015-04-14 12:36:29 +00:00
|
|
|
%-vm: %
|
2015-04-16 03:32:28 +00:00
|
|
|
cd vagrant-static && vagrant up $<
|
2014-11-04 14:36:49 +00:00
|
|
|
|
2016-08-06 22:23:23 +00:00
|
|
|
download-pkgs:
|
|
|
|
mkdir -p vagrant-static/pkgs && cd vagrant-static/pkgs && \
|
|
|
|
for pkg in $(PACKAGE_URLS); do \
|
2020-09-18 15:57:29 +00:00
|
|
|
if ! wget -N $${pkg}; then \
|
|
|
|
exit 1; \
|
|
|
|
fi \
|
2016-08-06 22:23:23 +00:00
|
|
|
done
|
|
|
|
|
2015-04-14 12:36:29 +00:00
|
|
|
%-build: % %-vm
|
2016-02-28 19:40:26 +00:00
|
|
|
cd vagrant-static && vagrant ssh $< -c "/vagrant/build.sh ${SRC_VERSION}"
|
2015-04-14 12:36:29 +00:00
|
|
|
|
|
|
|
%-package: % clean-outbox %-build
|
|
|
|
mkdir -p $<-pkg/lnav-${VERSION}
|
|
|
|
cp ../README ../NEWS $<-pkg/lnav-${VERSION}
|
2015-04-16 03:32:28 +00:00
|
|
|
mv vagrant-static/lnav $<-pkg/lnav-${VERSION}
|
2015-04-14 12:36:29 +00:00
|
|
|
cd $<-pkg && zip -r ../outbox/lnav-${VERSION}-$<-64bit.zip lnav-${VERSION}
|
2015-04-14 16:37:48 +00:00
|
|
|
rm -rf $<-pkg
|
2014-11-04 14:36:49 +00:00
|
|
|
|
2016-02-28 19:40:26 +00:00
|
|
|
linux-ospkg: pkger-vm linux-package
|
|
|
|
rm -f vagrant-static/lnav\*.deb vagrant-static/lnav\*.rpm
|
|
|
|
cd vagrant-static && vagrant ssh pkger -c "/vagrant/build-pkg.sh ${VERSION}"
|
|
|
|
mv vagrant-static/lnav*.deb vagrant-static/lnav*.rpm outbox/
|
|
|
|
|
2014-11-04 14:36:49 +00:00
|
|
|
osx-build:
|
|
|
|
rm -rf osx-build-dir
|
|
|
|
mkdir -p osx-build-dir
|
2015-04-05 23:10:47 +00:00
|
|
|
cd ../ && ./autogen.sh
|
2021-06-14 05:57:22 +00:00
|
|
|
cd osx-build-dir && \
|
|
|
|
../../configure --enable-static \
|
|
|
|
--with-readline=/usr/local/opt/readline \
|
|
|
|
--with-sqlite3=/usr/local/opt/sqlite \
|
|
|
|
--with-libarchive=/usr/local/opt/libarchive \
|
|
|
|
"CXXFLAGS=-I/usr/local/opt/ncurses/include -g1 -O2" \
|
|
|
|
"CFLAGS=-I/usr/local/opt/ncurses/include -g1 -O2" \
|
|
|
|
"LDFLAGS=-L/usr/local/opt/ncurses/lib -L/usr/local/opt/xz/lib" \
|
|
|
|
"LIBS=-llzma -lzstd -lbrotlidec-static -liconv -llz4" \
|
|
|
|
&& make -j8 && make dist -j8 && make dist-bzip2
|
2014-11-04 14:36:49 +00:00
|
|
|
|
|
|
|
osx-package: clean-outbox osx-build
|
|
|
|
mkdir -p osx-pkg/lnav-${VERSION}
|
|
|
|
cp ../README ../NEWS osx-pkg/lnav-${VERSION}
|
|
|
|
cp osx-build-dir/src/lnav osx-pkg/lnav-${VERSION}
|
|
|
|
cp osx-build-dir/lnav-${VERSION}.tar.gz outbox/
|
2014-11-06 05:29:31 +00:00
|
|
|
cp osx-build-dir/lnav-${VERSION}.tar.bz2 outbox/
|
2014-11-04 14:36:49 +00:00
|
|
|
cd osx-pkg && zip -r ../outbox/lnav-${VERSION}-os-x.zip lnav-${VERSION}
|
2015-04-14 16:37:48 +00:00
|
|
|
rm -rf osx-pkg
|
2014-11-04 14:36:49 +00:00
|
|
|
|
2021-05-28 20:26:31 +00:00
|
|
|
release: osx-package musl-package
|
2016-02-28 19:40:26 +00:00
|
|
|
|
|
|
|
push:
|
|
|
|
env LANG=UTF-8 package_cloud push tstack/lnav/ubuntu/lucid outbox/lnav*.deb
|
2022-07-16 05:31:43 +00:00
|
|
|
env LANG=UTF-8 package_cloud push tstack/lnav/el/5 outbox/lnav-0.11.0-1.x86_64.rpm
|
2016-02-28 19:40:26 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
cd vagrant-static && vagrant destroy -f
|
2016-08-06 22:23:23 +00:00
|
|
|
rm -rf vagrant-static/pkgs
|