全部博文(25)
分类: LINUX
2008-11-10 17:22:53
aubrey@aubrey-nexenta:~/deb$ ls -l hellodeb/ total 2 -rw-r--r-- 1 aubrey staff 203 Feb 16 12:50 Makefile -rw-r--r-- 1 aubrey staff 73 Feb 16 12:46 hellodeb.c |
PROG=hellodeb CC=gcc BINDIR=/usr/bin INSTALL=cp $(PROG): hellodeb.c $(CC) -o $(PROG) hellodeb.c clean: rm -rf $(PROG) install: $(INSTALL) $(PROG) $(BINDIR) uninstall: rm -rf $(BINDIR)/$(PROG) |
aubrey@aubrey-nexenta:~/deb/hellodeb$ gpg --list-keys /export/home/aubrey/.gnupg/pubring.gpg -------------------------------------- pub 1024D/7F8F1E57 2008-01-29 uid Aubrey Li sub 2048g/6AF6581E 2008-01-29 |
aubrey@aubrey-nexenta:~/deb$ ls hellodeb aubrey@aubrey-nexenta:~/deb$ mv hellodeb/ hellodeb-1.0 aubrey@aubrey-nexenta:~/deb$ ls hellodeb-1.0 |
aubrey@aubrey-nexenta:~/deb$ export DEBEMAIL="aubreylee@gmail.com" aubrey@aubrey-nexenta:~/deb$ export DEBFULLNAME="Aubrey Li" |
aubrey@aubrey-nexenta:~/deb/hellodeb-1.0$ dh_make Type of package: single binary, multiple binary, library, kernel module or cdbs? [s/m/l/k/b] s Maintainer name : Aubrey Li Email-Address : aubreylee@gmail.com Date : Sat, 16 Feb 2008 13:19:46 +0800 Package Name : hellodeb Version : 1.0 License : blank Type of Package : Single Hit Done. Please edit the files in the debian/ subdirectory now. You should also check that the hellodeb Makefiles install into $DESTDIR and not in / . aubrey@aubrey-nexenta:~/deb/hellodeb-1.0$ |
PROG=hellodeb CC=gcc BINDIR=$(DESTDIR)/usr/bin INSTALL=cp $(PROG): hellodeb.c $(CC) -o $(PROG) hellodeb.c clean: rm -rf $(PROG) install: mkdir -p $(BINDIR) $(INSTALL) $(PROG) $(BINDIR) uninstall: rm -rf $(BINDIR)/$(PROG) |
aubrey@aubrey-nexenta:~/deb/hellodeb-1.0/debian$ ls README.Debian control docs hellodeb-default.ex manpage.sgml.ex postrm.ex watch.ex changelog copyright emacsen-install.ex hellodeb.doc-base.EX manpage.xml.ex preinst.ex compat cron.d.ex emacsen-remove.ex init.d.ex menu.ex prerm.ex conffiles.ex dirs emacsen-startup.ex manpage.1.ex postinst.ex rules |
aubrey@aubrey-nexenta:~/deb/hellodeb-1.0/debian$ ls changelog compat control copyright dirs rules |
aubrey@aubrey-nexenta:~/deb/hellodeb-1.0$ dpkg-buildpackage -rfakeroot -sa |
aubrey@aubrey-nexenta:~/deb/hellodeb-1.0$ sudo -s Password: root@aubrey-nexenta:~/deb/hellodeb-1.0# dpkg-buildpackage -sa |
root@aubrey-nexenta:~/deb# dpkg-deb -c hellodeb_1.0-1_solaris-i386.deb drwxr-xr-x root/root 0 2008-02-16 13:56:12 ./ drwxr-xr-x root/root 0 2008-02-16 13:56:10 ./usr/ drwxr-xr-x root/root 0 2008-02-16 13:56:10 ./usr/share/ drwxr-xr-x root/root 0 2008-02-16 13:56:10 ./usr/share/doc/ drwxr-xr-x root/root 0 2008-02-16 13:56:12 ./usr/share/doc/hellodeb/ -rw-r--r-- root/root 246 2008-02-16 13:19:48 ./usr/share/doc/hellodeb/copyright -rw-r--r-- root/root 191 2008-02-16 13:19:48 ./usr/share/doc/hellodeb/changelog.Debian.gz drwxr-xr-x root/root 0 2008-02-16 13:56:11 ./usr/bin/ -rwxr-xr-x root/root 3436 2008-02-16 13:56:11 ./usr/bin/hellodeb root@aubrey-nexenta:~/deb# dpkg -i hellodeb_1.0-1_solaris-i386.deb Selecting previously deselected package hellodeb. (Reading database ... 31630 files and directories currently installed.) Unpacking hellodeb (from hellodeb_1.0-1_solaris-i386.deb) ... Setting up hellodeb (1.0-1) ... root@aubrey-nexenta:~/deb# which hellodeb /usr/bin/hellodeb root@aubrey-nexenta:~/deb# hellodeb hello deb root@aubrey-nexenta:~/deb# dpkg -r hellodeb (Reading database ... 31632 files and directories currently installed.) Removing hellodeb ... root@aubrey-nexenta:~/deb# which hellodeb root@aubrey-nexenta:~/deb# |