嗨,我在生成 Debian 软件包时遇到问题
我有 2 个文件要安装 1 是一个 BASH 脚本另一个是.桌面文件
/kate-folder-service-menu-0.1.0$ tree
.
└── usr
├── bin
│ └── ktexeditor-open-folder
└── share
└── kde4
└── services
└── ServiceMenus
└── kate-folder.desktop
现在我已经创建了所有的东西,与
dh_make -s -c GPL
我已经编辑了:
-控制文件-版权文件-规则文件
在我制作的规则文件中:
#!/usr/bin/make -f
# %:
# dh $@ --with-lzma
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
install --mode=777 -t debian/usr/bin usr/bin/ktexeditor-open-folder
install --mode=644 -t debian/usr/share/kde4/services/ServiceMenus usr/share/kde4/services/ServiceMenus/kate-folder.desktop
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
现在我做到了
debuild -uc -us --source-option=--include-binaries --source-option=-isession
最后这个
sudo pbuilder build MYSTUFF.dsc
但是这个混蛋在没有脚本和服务菜单的情况下生成 Debian 软件包:D
dpkg --contents kate-folder-service-menu_0.1.0-1_i386.deb
drwxr-xr-x root/root 0 2012-04-14 14:53 ./
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/share/
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/share/doc/
drwxr-xr-x root/root 0 2012-04-14 14:53 ./usr/share/doc/kate-folder-service-menu/
-rw-r--r-- root/root 201 2012-04-12 11:16 ./usr/share/doc/kate-folder-service-menu/README.Debian
-rw-r--r-- root/root 1239 2012-04-12 15:31 ./usr/share/doc/kate-folder-service-menu/copyright
-rw-r--r-- root/root 152 2012-04-12 15:55 ./usr/share/doc/kate-folder-service-menu/changelog.Debian.gz
如果
它给你老式的debhelper规则,那一定是一个古老的dh_make
。
我建议一个现代的最小debian/rules
:
#!/usr/bin/make -f
%:
dh $@
然后把它放在debian/install
usr/bin/ktexeditor-open-folder
usr/share/kde4/services/ServiceMenus/kate-folder.desktop
这将使用dh_install
将它们放在正确的位置,并执行所有其他常见操作来生成包。