Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
b2864a6477 | |||
d38e40a1f2 | |||
53e7d0ed06 | |||
e1c9a6b2a3 | |||
ab8e2f15f6 | |||
226170b547 | |||
47106d85c8 |
95
.drone.yml
95
.drone.yml
|
@ -104,3 +104,98 @@ steps:
|
|||
from_secret: email_password
|
||||
when:
|
||||
status: [ changed, failure ]
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: packages x86_64
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
volumes:
|
||||
- name: debian-package-cache
|
||||
host:
|
||||
path: /var/cache/debian-package-cache
|
||||
|
||||
steps:
|
||||
- name: download mastodonpp for buster
|
||||
image: plugins/download
|
||||
settings:
|
||||
source: https://schlomp.space/tastytea/mastodonpp/releases/download/0.4.0/libmastodonpp_0.4.0-0_amd64_buster.deb
|
||||
destination: mastodonpp_buster.deb
|
||||
|
||||
- name: download restclient-cpp source
|
||||
image: plugins/download
|
||||
settings:
|
||||
source: https://github.com/mrtazz/restclient-cpp/archive/0.5.1.tar.gz
|
||||
destination: restclient-cpp.tar.gz
|
||||
|
||||
- name: download linuxdeploy
|
||||
image: plugins/download
|
||||
settings:
|
||||
source: https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
destination: linuxdeploy
|
||||
|
||||
- name: AppImage
|
||||
image: debian:buster-slim
|
||||
pull: always
|
||||
environment:
|
||||
CXX: g++-8
|
||||
CXXFLAGS: -pipe -O2
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
LANG: C.utf8
|
||||
commands:
|
||||
- rm /etc/apt/apt.conf.d/docker-clean
|
||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||
- apt-get update -q
|
||||
- echo "deb https://packagecloud.io/mrtazz/restclient-cpp/debian/ buster main" > /etc/apt/sources.list.d/restclient-cpp.list
|
||||
- apt-get install -qq debian-archive-keyring curl gnupg apt-transport-https
|
||||
- curl -L https://packagecloud.io/mrtazz/restclient-cpp/gpgkey | apt-key add -
|
||||
- apt-get update -q
|
||||
- apt-get install -qq build-essential cmake asciidoc
|
||||
- apt-get install -qq libboost-filesystem-dev libboost-log-dev libboost-regex-dev libjsoncpp-dev catch libcurl4-openssl-dev restclient-cpp
|
||||
- apt-get -qq install ./mastodonpp_buster.deb
|
||||
- tar -xf restclient-cpp.tar.gz
|
||||
- cd restclient-cpp-*
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=/usr .
|
||||
- cmake --build .
|
||||
- make install
|
||||
- cd ..
|
||||
- chmod +x linuxdeploy
|
||||
- rm -rf build && mkdir -p build && cd build
|
||||
- cmake -DWITH_DESKTOP -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
- cmake --build .
|
||||
- make install DESTDIR=AppDir
|
||||
- cd ..
|
||||
- VERSION="${DRONE_TAG}" ./linuxdeploy --appdir build/AppDir --output appimage
|
||||
volumes:
|
||||
- name: debian-package-cache
|
||||
path: /var/cache/apt/archives
|
||||
|
||||
- name: release
|
||||
image: plugins/gitea-release
|
||||
pull: always
|
||||
settings:
|
||||
base_url: https://schlomp.space
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
title: ${DRONE_TAG}
|
||||
prerelease: true
|
||||
files:
|
||||
- mastorss-${DRONE_TAG}-x86_64.AppImage
|
||||
checksum:
|
||||
- sha512
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
pull: always
|
||||
settings:
|
||||
host: cryptoparty-celle.de
|
||||
from: drone@tzend.de
|
||||
username:
|
||||
from_secret: email_username
|
||||
password:
|
||||
from_secret: email_password
|
||||
when:
|
||||
status: [ changed, failure ]
|
||||
|
|
|
@ -19,6 +19,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
|||
|
||||
# Project build options.
|
||||
option(WITH_MAN "Compile and install manpage." YES)
|
||||
option(WITH_DESKTOP "Build and install a .desktop file." NO)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
@ -37,4 +38,18 @@ endif()
|
|||
install(FILES watchwords.json
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/mastorss")
|
||||
|
||||
if(WITH_DESKTOP)
|
||||
# Needed for AppImage.
|
||||
configure_file("de.tastytea.${PROJECT_NAME}.desktop.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/de.tastytea.${PROJECT_NAME}.desktop" @ONLY)
|
||||
# linuxdeploy insists on an icon.
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/de.tastytea.${PROJECT_NAME}.svg" "")
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/de.tastytea.${PROJECT_NAME}.desktop"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/de.tastytea.${PROJECT_NAME}.svg"
|
||||
"${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps")
|
||||
endif()
|
||||
|
||||
# include(cmake/packages.cmake)
|
||||
|
|
|
@ -55,6 +55,10 @@ cmake ..
|
|||
cmake --build .
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
.CMake options:
|
||||
* `-DWITH_MAN=NO` to not compile the manpage (default is `YES`).
|
||||
* `-DWITH_DESKTOP=YES` to build the .desktop file (default is `NO`).
|
||||
|
||||
Install with `make install`.
|
||||
|
||||
== Usage
|
||||
|
|
12
de.tastytea.mastorss.desktop.in
Normal file
12
de.tastytea.mastorss.desktop.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
# Version=1.1
|
||||
Name=@PROJECT_NAME@
|
||||
NoDisplay=true
|
||||
Comment=@PROJECT_DESCRIPTION@
|
||||
Icon=de.tastytea.mastorss
|
||||
Exec=@PROJECT_NAME@
|
||||
Terminal=true
|
||||
Categories=Network;
|
||||
Keywords=RSS;Mastodon;
|
||||
StartupNotify=false
|
Loading…
Reference in New Issue
Block a user