hasura skor 构建安装

hasura skor 前边有介绍过是一个挺不错的event trigger 插件,我们可以用来进行事件通知处理
官方有提供构建的方法,但是有些还是会有点问题,所以结合构建碰到的问题,修改下

clone 代码

 
git clone https://github.com/hasura/skor.git

安装依赖

  • libpg && curl
yum install -y libpqxx-devel libcurl-devel
说明: libpq 的安装也可以通过devel 包,这种一般出现在存在多版本pg 的情况下
  • 配置Makefile

    因为我电脑安装了多个pg 版本,所以通过手工指定pg_config,但是我指定配置使用pg9.6

配置PKG_CONFIG_PATH

export PKG_CONFIG_PATH=/usr/pgsql-9.6/lib/pkgconfig

修改makefile,方便进行libpq 查找

project := skor
current_dir := $(shell pwd)
registry := hasura
CPPFLAGS += $(shell pkg-config --cflags libpq)
CPPLIBS += $(shell pkg-config --libs libpq)
version := 0.2
build_dir := $(current_dir)/build
skor: src/skor.c src/req.c
 mkdir -p build
 c99 $(CPPFLAGS) $(CPPLIBS) -O3 -Wall -Wextra -o build/skor src/skor.c src/log.c -lcurl
clean:
 rm -rf build
image:
 docker build -t $(registry)/$(project):$(version) .

参考资料

https://github.com/hasura/skor
https://people.freedesktop.org/~dbn/pkg-config-guide.html
https://stackoverflow.com/questions/51498447/libpq-library-in-centos
https://serverfault.com/questions/316703/how-to-install-libpq-dev-on-centos-5-5

posted on   荣锋亮  阅读(456)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-06-04 chaos-engineering 的一些开源工具
2017-06-04 drill 表&&视图使用
2017-06-04 drill 数据源配置补充
2015-06-04 javascript 函数节流方法
2014-06-04 C# winform 使用DsoFramer 创建 显示office 文档
2014-06-04 visual studio 2014 新特性
2014-06-04 转 管线开发

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示