栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > .Net

(二)ubuntu使用launchpad.net线上编译

.Net 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

(二)ubuntu使用launchpad.net线上编译

1.安装环境

sudo apt update
sudo apt install dh-make
sudo apt install devscripts
sudo apt install build-essential

2.创建一个二级目录

mkdir ~/test/hello-1.0 -p
cd ~/test/hello-1.0

3.创建文件
hello.c 文件内容

//cat hello.c
#include 

int main(void)
{
        printf("%sn","Hello");
        return 0;
}

Makefile 文件内容

# cat Makefile
hello:hello.o
	gcc -o hello hello.o
hello.o:hello.c
	gcc -o hello.o -c hello.c
.PHONY:rebuild clean
rebuild:clean hello
clean:
	rm -f hello hello.o

4.⽣成debian⽬录

dh_make --createorig -e liruijian@kylinos.cn

5.在debian目录下创建install文件

vi debian/install

install 文件内容

hello /bin

6.编译出changelog

debuild -S  -sa -Inothing

7.推到launchpad.net编译

dput ppa:liruijian/hello ../hello_1.0-1_source.changes

会推送失败,处理如下:
修改debian/control文件为:

Source: hello
Section: libs
Priority: optional
Maintainer: jian 
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: 
#Vcs-Git: git://anonscm.debian.org/collab-maint/hello.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/hello.git

Package: hello
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: 
 
jian@ubuntu:~/share/src/hello-1.0$ 

修改debian/changelog文件为:

hello (1.0-1) xenial; urgency=medium

  * Initial release (Closes: #nnnn)  

 -- liruijian   Thu, 13 May 2021 16:32:31 +0800

就可以上传成功并且编译通过。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/910808.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号