昨天写过一个使用rpm 打包分发pg 扩展的demo,今天使用deb 进行打包分发,同时使用checkinstall 生成我们的deb包

安装deb 依赖

sudo apt-get install checkinstall build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev

clone pg 扩展代码

git clone https://github.com/rongfengliang/nvl-pg-extension.git

使用checkinstall 生成deb 包

  • 命令
checkinstall

效果

checkinstall

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL. The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y Preparing package documentation...OK Please write a description for the package.
End your description with an empty line or EOF.
>> this is a oracel like nvl function for pg

修改Version 的名称,使用数字开头,这个是约定,按照以下提示输入3操作即可,比如0.1

This package will be built according to these values:

0 - Maintainer: [ root@iZ2zec9crwxl1n9hb7hxgpZ ]
1 - Summary: [ demo ]
2 - Name: [ nvl-pg ]
3 - Version: [ extension ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ nvl-pg-extension ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ nvl-pg ]
12 - Conflicts: [ ]
13 - Replaces: [ ]

deb 包生成日志

nter a number to change any of them or press ENTER to continue:

Installing with make install...

========================= Installation results ===========================
/bin/mkdir -p '/usr/share/postgresql/10/extension'
/bin/mkdir -p '/usr/share/postgresql/10/extension'
/usr/bin/install -c -m 644 .//nvlfunc.control '/usr/share/postgresql/10/extension/'
/usr/bin/install -c -m 644 .//nvlfunc--1.0.sql '/usr/share/postgresql/10/extension/' ======================== Installation successful ========================== Copying documentation directory...
./
./README.md Copying files to the temporary directory...OK Stripping ELF binaries and libraries...OK Compressing man pages...OK Building file list...OK Building Debian package...OK Installing Debian package...OK Erasing temporary files...OK Writing backup package...OK
OK Deleting temp dir...OK ********************************************************************** Done. The new package has been installed and saved to /opt/deb-app/nvl-pg-extension/nvl-pg_0.1-1_amd64.deb You can remove it from your system anytime using: dpkg -r nvl-pg **********************************************************************
  • 说明
    需要删除copy的文件,这点不如rpm 好(rpm 有一个buildroot 的目录),checkinstall 直接就安装了
  • 生成的文件
├── Makefile
├── README.md
├── backup-040420191431-pre-nvl-pg.tgz
├── description-pak
├── doc-pak
│ └── README.md
├── nvl-pg_0.1-1_amd64.deb
├── nvlfunc--1.0.sql
└── nvlfunc.control

安装

  • 安装
dpkg -i nvl-pg_0.1-1_amd64.deb
  • 效果
(Reading database ... 115363 files and directories currently installed.)
Preparing to unpack nvl-pg_0.1-1_amd64.deb ...
Unpacking nvl-pg (0.1-1) over (0.1-1) ...
Setting up nvl-pg (0.1-1) ...
Processing triggers for postgresql-common (199.pgdg18.04+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:

pg 扩展目录

find /usr/share/postgresql/10/extension/ -name nvlfunc.control
/usr/share/postgresql/10/extension/nvlfunc.control

说明

使用checkinstall 方式打包deb 包还是很方便的,简单,省事

参考资料

https://www.ostechnix.com/create-deb-file-source-ubuntu-16-04/

 
 
 
 

使用deb 打包开发的postgres extension的更多相关文章

  1. 使用deb 打包开发的postgres extension 另外一种方法

    已经写过一个deb 包打包的方法,我们同时也可以使用dpkg-deb 命令 安装依赖工具包 推荐安装全点的 sudo apt-get install build-essential autoconf ...

  2. 使用rpm 打包开发的postgres extension

      环境准备 安装依赖包 rpmdevtools rpm-build yum install -y rpm-build rpmdevtools 初始化rpm pacakge 项目 主要是rpm 打包的 ...

  3. linux软件deb打包及开机管理员自启动

    环境:Ubuntu 18.04/16.04  Qt:5.12.6 一 deb打包 1.建立目录结构 2.目录内容 1) 子目录DC520: Get以上内容步骤: (1)   创建目录DC520(自己软 ...

  4. Swift开发第二篇——extension及fatalError

    本篇分两部分: 一.extension在 Swift 中的使用 二.Swift 中的 fatalError 一.extension在 Swift 中的使用 在 swift 中我们可以通过 extens ...

  5. ubuntu deb pacakge 开发

    安装构建工具 apt-get install pbuilder 推荐安装 sudo apt-get install build-essential autoconf automake \ autoto ...

  6. 树莓派.Qt.打包开发好的程序并运行的方法

    Qt开发的软件, 想要部署在树莓派上运行, 需要进行打包和发布 主要步骤如下: 1. 找1个树莓派用于开发与打包, 所以需要在它上面安装Qt开发环境 树莓派上安装Qt的方法, 可以看这里>> ...

  7. SAP成都研究院安德鲁:自己动手开发一个Chrome Extension

    各位好,我叫何金鑫(He Andrew), 团队同事亲切地称呼在下为安德鲁.如果你在附近找到wifi热点名为 「安德鲁森面包房5g」,可能是我就在附近,我们可以去喝杯咖啡,聊聊最近有趣的东西. 鄙人现 ...

  8. [nghttp2]压测工具,源码编译并进行deb打包过程

    编译环境:deepin 15.11桌面版 nghttp2下载地址:https://github.com/nghttp2/nghttp2 环境要求 emm只能在类Linux环境才能完整编译,想在Wind ...

  9. VUE 如何分环境打包(开发/测试/生产)配置

    前言 之前小玲一直处于更新,迭代项目的状态,开发环境.测试环境.生产环境都是前辈配置好的,自己几乎没有配置过,这次做几个新项目时,面临着上线,需要分环境打包配置,于是在网上遨游了一会会,摸索着按照网上 ...

随机推荐

  1. windows同时安装了两种jdk

    因为某种需要,同时安装jdk1.8 和jdk1.7 因为电脑曾经安装了jdk1.8,并且已经设置好环境变量.后来新添加的jdk1.7 出现问题: 先是安装的1.8,之后有安装了1.7,在环境变量中也配 ...

  2. FileWriter向文件中写入内容

    1.创建fileWriter对象 2.写入文件信息 3.关闭流 必须关闭流,否则将不能写入文件中 /** * * @author Administrator * 文件写入对象的使用 * */ publ ...

  3. noip模拟ernd

    [题目背景]解决了第一题之后,你打开了第二题.这是一道关于树的题目,你很快想出了一个复杂度和树的直径有关的算法,可以通过所有的数据.不过,你的做法常数似乎有点大.为了更好地卡常,你决定构造一些数据来检 ...

  4. 在Postman中使用不受信任的SSL证书(转)

    add by zhj: 在http://www.cnblogs.com/ajianbeyourself/p/3898911.html中提到: 对于不受信任的证书,浏览器会发出告警,不过这些也只是告警而 ...

  5. Python—字符串的操作

    字符串的操作 变量: 变量只能是 字母,数字或下划线的任意组合,但首个字符不能为数字,且不能有空格 以下关键字不能声明为变量: and ,as, assert, break ,class ,conti ...

  6. Linq中datetime的处理以及asp.net下拉列表控件的selectitem,text等的设置显示处理

    dhl:报错:LINQ to Entities 不支持指定的类型成员“Date” Linq如: var v = from l in _dal.Share where l.PingcoId == pin ...

  7. python3入门教程(一)之 hello world

    概述 python 这门语言这几年非常的火,很多技术都用的到,像爬虫,大数据,人工智能等,包括很多的小孩都首选python作为入门学习语言,那python 究竟是怎样一门语言呢? Python 是一个 ...

  8. cocoa pods自己的笔记

    备注:这里只是个人的观点,有的地方也是copy,多多指教,个人笔记,有侵犯你们版权的地方还望海涵!!! 卡主不动 安装流程:http://www.tuicool.com/articles/qaMfuy ...

  9. java 集合之set。

    Set具有与Collection完全一样的接口,因此没有任何额外的功能,不象前面有两个不同的List.实际上Set就是Collection,只是行为不同.(这是继承与多态思想的典型应用:表现不同的行为 ...

  10. Java语法基础学习DayEighteen(常用类)

    一.String类 1.特点 String代表不可变的字符序列,底层用char[]存放. String是final的. 2.内存解析 3.常用方法 int length() char charAt(i ...