====== Rebuilding Debian Packages ====== ===== 다운로드 ===== * apt-get 명령을 통하여 소스를 다운받는다.(일반유저로 실행해도 된다.) * get the source to the package foo $ apt-get source foo * get and install the packages required to rebuild the package foo $ apt-get build-dep foo * These two steps you will have to perform for each rebuild you need to do, but thankfully they are very simple to remember and automate * debuild 패키지가 설치되어 있지 않다면 설치한다. # apt-get install devscripts ===== 재컴파일(apache2 rebuild) ===== - apache2 를 다운로드받아보자. $ mkdir /tmp/dpkg $ cd $! $ apt-get source apache2 - 해당 소스 디렉토리로 찾아간다. $ cd apache2-2.2.3/ - 컴파일옵션을 수정한다. $ vi debian/rules - debuild 명령을 통해서 컴파일을 진행한다. $ debuild -rfackroot or $ debuild -us -uc - debuild 가 제대로 되지 않았을 경우 컴파일정보를 청소(clean)해준다. $ debuild clean - debuild 가 정상적으로 진행되었다면, 상위디렉토리에 deb 파일(들)이 생성되어 있다. $ cd /tmp/dpkg/ $ ls *.deb