我正在运行debuild和lintian自动发现两个错误,我有与手册。
运行debuild命令后的项目结构如下所示
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如下所示
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显示
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没有任何手册页。我做错了什么?
目前,我的手册页面只有一个句子
NAME: electrotest_standalone发布于 2022-06-17 09:03:01
您的手册页需要安装在/usr/share/man的子目录中,这取决于它的部分,并且需要适当地命名它。在您的例子中,目标应该是/usr/share/man/man1/electrotest_standalone.1。
见相关的lintian标签信息。通过运行lintian -i,您可以在本地看到这一点。还请注意,除非您打算将包提交给Debian档案,否则您不需要关心所有的lintian警告;只需确保您没有任何实际错误(E:)。
https://unix.stackexchange.com/questions/706523
复制相似问题