|
404.
|
|
|
You will need to adjust the <filename>changelog</filename>slightly in this case to reflect that this package is named <application>hello-debhelper</application> rather than just <application>hello</application>:
|
|
|
|
여러분은 이 경우에, 단지 <application>hello</application> 대신에 <application>hello-debhelper</application> 으로 이름한 이 패키지를 반영하기 위하여 <filename>changelog</filename> 파일을 약간 조정할 필요가 있습니다:
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:816(para)
|
|
405.
|
|
|
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:822(screen)
|
|
406.
|
|
|
By using <application>debhelper</application>, the only things we need to change in <filename>control</filename> are the name (substituting <application>hello</application> for <application>hello-debhelper</application>) and adding <application>debhelper (>= 4.0.0)</application> to the <emphasis>Build-Depends</emphasis> field for the source package. The <phrase>Ubuntu</phrase> package for <application>hello-debhelper</application> looks like:
|
|
|
|
<application>debhelper</application> 를 사용하는 것에 의해, 우리가 <filename>control</filename> 파일 내에 변경하는 것은 단지 이름 (<application>hello-debhelper</application> 을 위하여 <application>hello</application> 대체) 과 소스 패키지를 위하여 <application>debhelper (>= 4.0.0)</application> 를 <emphasis>Build-Depends</emphasis> 필드에 더하는 것 입니다. <application>hello-debhelper</application> 를 위한 <phrase>우분투</phrase> 패키지는 다음과 같습니다:
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:829(para)
|
|
407.
|
|
|
![](/@@/translation-newline)
Source: hello-debhelper ![](/@@/translation-newline)
Section: devel ![](/@@/translation-newline)
Priority: extra ![](/@@/translation-newline)
Maintainer: Capitan Packager <packager@coolness.com> ![](/@@/translation-newline)
Standards-Version: 3.6.1 ![](/@@/translation-newline)
Build-Depends: debhelper (>= 4)
![](/@@/translation-newline)
Package: hello-debhelper ![](/@@/translation-newline)
Architecture: any ![](/@@/translation-newline)
Depends: ${shlibs:Depends} ![](/@@/translation-newline)
Conflicts: hello ![](/@@/translation-newline)
Provides: hello ![](/@@/translation-newline)
Replaces: hello ![](/@@/translation-newline)
Description: The classic greeting, and a good example
The GNU hello program produces a familiar, friendly greeting. It
allows non-programmers to use a classic computer science tool which
would otherwise be unavailable to them.
.
Seriously, though: this is an example of how to do a Debian package.
It is the Debian version of the GNU Project's `hello world' program
(which is itself an example for the GNU Project).
.
This is the same as the hello package, except it uses debhelper to
make the deb. Please see debhelper as to what it is.
[tab] [tab]
|
|
|
[tab] represents a tab character.
Please write it exactly the same way, [tab] , in your
translation.
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
![](/@@/translation-newline)
Source: hello-debhelper ![](/@@/translation-newline)
Section: devel ![](/@@/translation-newline)
Priority: extra ![](/@@/translation-newline)
Maintainer: Capitan Packager <packager@coolness.com> ![](/@@/translation-newline)
Standards-Version: 3.6.1 ![](/@@/translation-newline)
Build-Depends: debhelper (>= 4)
![](/@@/translation-newline)
Package: hello-debhelper ![](/@@/translation-newline)
Architecture: any ![](/@@/translation-newline)
Depends: ${shlibs:Depends} ![](/@@/translation-newline)
Conflicts: hello ![](/@@/translation-newline)
Provides: hello ![](/@@/translation-newline)
Replaces: hello ![](/@@/translation-newline)
Description: The classic greeting, and a good example
The GNU hello program produces a familiar, friendly greeting. It
allows non-programmers to use a classic computer science tool which
would otherwise be unavailable to them.
.
Seriously, though: this is an example of how to do a Debian package.
It is the Debian version of the GNU Project's `hello world' program
(which is itself an example for the GNU Project).
.
This is the same as the hello package, except it uses debhelper to
make the deb. Please see debhelper as to what it is.
[tab] [tab]
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:838(screen)
|
|
408.
|
|
|
We can copy the <filename>copyright</filename> file and the <filename>postinst</filename> and <filename>prerm</filename> scripts from the <phrase>Ubuntu</phrase><application>hello-debhelper</application> package, as they have not changed since <xref linkend="basic-scratch"/>. We will also copy the <filename>rules</filename> file so we can inspect it.
|
|
|
|
우리는, 다음의 파일들이 <xref linkend="basic-scratch"/> 이후로 변경이 된 것이 없으므로, <filename>copyright</filename> 와 <filename>postinst</filename> 그리고 <filename>prerm</filename> 스크립트를 <phrase>우분투</phrase> <application>hello-debhelper</application> 패키지에서 복사할 수 있습니다. 또한 우리는 <filename>rules</filename> 파일을 복사하여 그것을 검사할 수 있습니다.
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:865(para)
|
|
409.
|
|
|
![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/copyright . ![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/postinst . ![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/prerm . ![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/rules.
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/copyright . ![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/postinst . ![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/prerm . ![](/@@/translation-newline)
cp ../../ubuntu/hello-debhelper-2.1.1/debian/rules.
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:873(screen)
|
|
410.
|
|
|
The last file we need to look at is <filename>rules</filename>, where the power of <application>debhelper</application> scripts can be seen. The <application>debhelper</application> version of <filename>rules</filename> is somewhat smaller (54 lines as opposed to 72 lines in the version from <xref linkend="basic-scratch-rules"/>).
|
|
|
|
마지막으로 봐야할 파을은 <filename>rules</filename>입니다. 이 파일에서 <application>debhelper</application> 스크립트의 기능을 확인해보실 수 있습니다. <filename>rules</filename>의 54줄 짜리 <application>debhelper</application>용 버전은 72줄 짜리 <xref linkend="basic-scratch-rules"/>용 버전보다 좀 짧습니다.
|
|
Translated and reviewed by
Sunjae Park
|
|
|
|
Located in
C/basic.xml:879(para)
|
|
411.
|
|
|
The <application>debhelper</application> version looks like:
|
|
|
|
<application>debhelper</application> 버전은 다음과 비슷합니다:
|
|
Translated and reviewed by
atie
|
|
|
|
Located in
C/basic.xml:886(para)
|
|
412.
|
|
|
#!/usr/bin/make -f
![](/@@/translation-newline)
package = hello-debhelper
![](/@@/translation-newline)
CC = gcc ![](/@@/translation-newline)
CFLAGS = -g -Wall
![](/@@/translation-newline)
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O2 ![](/@@/translation-newline)
endif
![](/@@/translation-newline)
#export DH_VERBOSE=1
![](/@@/translation-newline)
clean:
dh_testdir
dh_clean
rm -f build
-$(MAKE) -i distclean
![](/@@/translation-newline)
install: build
dh_clean
dh_installdirs
$(MAKE) prefix=$(CURDIR)/debian/$(package)/usr \
mandir=$(CURDIR)/debian/$(package)/usr/share/man \
infodir=$(CURDIR)/debian/$(package)/usr/share/info \
install
![](/@@/translation-newline)
build:
./configure --prefix=/usr
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
touch build
![](/@@/translation-newline)
binary-indep: install ![](/@@/translation-newline)
# There are no architecture-independent files to be uploaded ![](/@@/translation-newline)
# generated by this package. If there were any they would be ![](/@@/translation-newline)
# made here.
![](/@@/translation-newline)
binary-arch: install
dh_testdir -a
dh_testroot -a
dh_installdocs -a NEWS
dh_installchangelogs -a ChangeLog
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
![](/@@/translation-newline)
binary: binary-indep binary-arch
![](/@@/translation-newline)
.PHONY: binary binary-arch binary-indep clean checkroot
[tab] [tab] [tab]
|
|
|
[tab] represents a tab character.
Please write it exactly the same way, [tab] , in your
translation.
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
#!/usr/bin/make -f
![](/@@/translation-newline)
package = hello-debhelper
![](/@@/translation-newline)
CC = gcc ![](/@@/translation-newline)
CFLAGS = -g -Wall
![](/@@/translation-newline)
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O2 ![](/@@/translation-newline)
endif
![](/@@/translation-newline)
#export DH_VERBOSE=1
![](/@@/translation-newline)
clean:
dh_testdir
dh_clean
rm -f build
-$(MAKE) -i distclean
![](/@@/translation-newline)
install: build
dh_clean
dh_installdirs
$(MAKE) prefix=$(CURDIR)/debian/$(package)/usr \
mandir=$(CURDIR)/debian/$(package)/usr/share/man \
infodir=$(CURDIR)/debian/$(package)/usr/share/info \
install
![](/@@/translation-newline)
build:
./configure --prefix=/usr
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
touch build
![](/@@/translation-newline)
binary-indep: install ![](/@@/translation-newline)
# There are no architecture-independent files to be uploaded ![](/@@/translation-newline)
# generated by this package. If there were any they would be ![](/@@/translation-newline)
# made here.
![](/@@/translation-newline)
binary-arch: install
dh_testdir -a
dh_testroot -a
dh_installdocs -a NEWS
dh_installchangelogs -a ChangeLog
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
![](/@@/translation-newline)
binary: binary-indep binary-arch
![](/@@/translation-newline)
.PHONY: binary binary-arch binary-indep clean checkroot
[tab] [tab] [tab]
|
|
Translated and reviewed by
Sunjae Park
|
|
|
|
Located in
C/basic.xml:888(screen)
|
|
413.
|
|
|
Notice that tasks like testing if you are in the right directory (<application>dh_testdir</application>), making sure you are building the package with root privileges (<application>dh_testroot</application>), installing documentation (<application>dh_installdocs</application> and <application>dh_installchangelogs</application>), and cleaning up after the build (<application>dh_clean</application>) are handled automatically. Many packages much more complicated than <application>hello</application> have <filename>rules</filename> files no bigger because the <application>debhelper</application> scripts handle most of the tasks. For a complete list of <application>debhelper</application> scripts, please see <xref linkend="appendix-debhelper"/>. They are also well documented in their respective <application>man</application> pages. It is a useful exercise to read the man page (they are well written and not lengthy) for each helper script used in the above <filename>rules</filename> file.
|
|
|
|
참고로, 현재 올바른 디렉트리에 있는지(<application>dh_testdir</application>), 루트 권한으로 패키지를 빌드하고 있는지(<application>dh_testroot</application>) 확인하는 작업, 문서를 설치하고((<application>dh_installdocs</application>와 <application>dh_installchangelogs</application>), 빌드가 끝난 후 정리하는 작업(<application>dh_clean</application>)은 모두 자동으로 처리됩니다. <application>hello</application> 패키지보다 훨씬 복잡한 패키지들도 filename>rules</filename>파일의 크기가 별반 다르지 않습니다. 그 이유는 <application>debhelper</application> 스크립트에서 필요한 작업을 대부분 처리하기 때문입니다. <application>debhelper</application> 스크립트의 완전한 목록을 보기 위해서는 <xref linkend="appendix-debhelper"/>를 참조하시기 바랍니다. 이 스크립트들에 관한 정보는 <application>man</application>페이지에도 잘 정리되어 있습니다. 앞에 <filename>rules</filename> 파일에 있는 스크립트 맨페이지에 해당 스크립트에 관한 설명이 잘 정리되어 있고 길이가 길지 않기 때문에 맨페이지를 읽는 것을 권장합니다.
|
|
Translated and reviewed by
Sunjae Park
|
|
|
|
Located in
C/basic.xml:944(para)
|