2015-09-27 52 views
1

我想用許多小的bash文件和JAR文件創建DEB包。這是控制文件:用jar文件創建DEB包

Source: agent 
Section: unknown 
Priority: optional 
Maintainer: [email protected] 
Build-Depends: debhelper (>= 9) 
Standards-Version: 3.9.5 
Homepage: www.test.com 
#Vcs-Git: git://anonscm.debian.org/collab-maint/agent.git 
#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/agent.git;a=summary 

Package: agent 
Architecture: all 
Depends: ${misc:Depends} 
Description: agent 
override_dh_fixperms: 
     dh_fixperms 
     find debian -name '*.*' -exec chmod 0644 {} + 

該tar文件是2.7 MB。 生成的DEB文件是2.1 KB 看起來我缺少一些配置。你能幫我解決這個問題嗎?

回答

0

您的代碼片段顯示您已經混合了包裝中使用的許多不同文件。

debian/control提供有關包裝的信息(例如,建立該二進制包,包如何二進制彼此相關;人類可讀描述什麼一個二進制包約)

它不包含任何(例如,調用javac來編譯java類),也沒有關於實際內容(例如包中包含哪些文件)的信息。

構建腳本(或meta構建腳本,因爲它通常調用上游的構建系統)在debian/rules中定義。順便說一下,這是經常有像override_dh_fixperms:行,而這些行是從來沒有debian/control發現的文件。

,有許多方法如何確定哪些文件將被包含在一個包,其中最簡單的文件/目錄中debian/install列表(每行一個)(分別爲debian/PACKAGE.install

真的應在做任何其他事情之前,閱讀有關創建Debian軟件包的official documentation

+1

你能舉個例子嗎? –