首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在错误目录和二进制命令页中重新构建lintian命令页。

在错误目录和二进制命令页中重新构建lintian命令页。
EN

Unix & Linux用户
提问于 2022-06-17 08:58:11
回答 1查看 92关注 0票数 0

我正在运行debuild和lintian自动发现两个错误,我有与手册。

运行debuild命令后的项目结构如下所示

代码语言:javascript
复制
hoseopjeong@hoseopjeong-VirtualBox:~/Documents/HoseopJeong_debian_lab9/debianlaboration9-0.0$ tree
.
├── debian
│   ├── changelog
│   ├── compat
│   ├── control
│   ├── copyright
│   ├── debhelper-build-stamp
│   ├── debianlaboration9
│   │   ├── DEBIAN
│   │   │   ├── control
│   │   │   └── md5sums
│   │   └── usr
│   │       ├── bin
│   │       │   └── electrotest_standalone
│   │       └── share
│   │           ├── doc
│   │           │   └── debianlaboration9
│   │           │       ├── changelog.Debian.gz
│   │           │       ├── copyright
│   │           │       └── README.Debian
│   │           └── man
│   │               └── electrotest_standalone.man.gz
│   ├── debianlaboration9.debhelper.log
│   ├── debianlaboration9.substvars
│   ├── files
│   ├── patches
│   │   └── series
│   ├── README.Debian
│   ├── rules
│   ├── source
│   │   ├── format
│   │   └── local-options
│   └── watch
├── electrotest_standalone
├── electrotest_standalone.man
├── Makefile
└── src
    └── electrotest_standalone.c

析构使用的makefile如下所示

代码语言:javascript
复制
prefix = /usr/local
all: electrotest

electrotest: ./src/electrotest_standalone.c
    gcc -o electrotest_standalone ./src/electrotest_standalone.c -lm
install:electrotest
    install -D electrotest_standalone \
    $(DESTDIR)$(prefix)/bin/electrotest_standalone
    mkdir $(DESTDIR)/usr/share
    mkdir $(DESTDIR)/usr/share/man
    cp electrotest_standalone.man \
    $(DESTDIR)/usr/share/man/
clean:
    -rm -f electrotest 

distclean:clean
uninstall:
    -rm -f $(DESTDIR)$(prefix)/bin/electrotest_standalone

.PHONY: all install clean distclean uninstall

因此,据我所知,man文件必须位于usr/share/man中。这就是为什么我使用Makefile手动创建ushare/man文件夹的原因,并且我可以看到当我运行debuild命令时,debuild会创建这些文件夹,并且使用cp electrotest_standalone.man \ $(DESTDIR)/usr/share/man/,debuild还设法将该文件复制到由debuild生成的man文件夹中。然而,林田还是不喜欢这样。

当我运行debuild时,lintian显示

代码语言:javascript
复制
Now running lintian...
W: debianlaboration9: improbable-bug-number-in-closes 10
E: debianlaboration9: manpage-in-wrong-directory usr/share/man/electrotest_standalone.man.gz
W: debianlaboration9: binary-without-manpage usr/bin/electrotest_standalone

它说我的man文件在错误的位置,二进制文件electrotest_standalone没有任何手册页。我做错了什么?

目前,我的手册页面只有一个句子

代码语言:javascript
复制
NAME: electrotest_standalone
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2022-06-17 09:03:01

您的手册页需要安装在/usr/share/man的子目录中,这取决于它的部分,并且需要适当地命名它。在您的例子中,目标应该是/usr/share/man/man1/electrotest_standalone.1

相关的lintian标签信息。通过运行lintian -i,您可以在本地看到这一点。还请注意,除非您打算将包提交给Debian档案,否则您不需要关心所有的lintian警告;只需确保您没有任何实际错误(E:)。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/706523

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档