Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ matrix:
script:
# Build the package, its tests, and its docs and run the tests
- test/script
- name: build ff deb
install:
# Build ff
- $STACK build ff
script:
# Create .deb from binary
- make deb
- name: hlint
install:
- $STACK build hlint
Expand Down
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Environment
BIN_NAME := ff

LOCAL_BINARY_PATH = $(shell stack path --local-install-root)

LOCAL_FF_VERSION = $(shell stack query locals ff version | tr -d \')

LOCAL_FF_SIZE = $(shell ls -l --b=K $(LOCAL_BINARY_PATH)/bin/$(BIN_NAME) | cut -d " " -f5 | tr -d K)

# prepare deb
.PHONY: deb
deb:
rm -rf ff-deb

mkdir -p ff-deb/
mkdir -p ff-deb/usr/bin
cp $(LOCAL_BINARY_PATH)/bin/$(BIN_NAME) ff-deb/usr/bin/

mkdir ff-deb/DEBIAN
touch ff-deb/DEBIAN/control

echo \
"Package: ff \
\nVersion: $(LOCAL_FF_VERSION) \
\nArchitecture: all \
\nMaintainer: Yuriy Syrovetskiy \
\nInstalled-Size: $(LOCAL_FF_SIZE) \
\nSection: text \
\nPriority: optional \
\nHomepage: https://github.com/ff-notes/ff \
\nDescription: A distributed note taker and task manager." \
>> ff-deb/DEBIAN/control

cp LICENSE ff-deb/DEBIAN/copyright

cd ff-deb && dpkg-deb -b ./ ./