Chinaunix首页 | 论坛 | 博客
  • 博客访问: 182457
  • 博文数量: 28
  • 博客积分: 1226
  • 博客等级: 中尉
  • 技术积分: 300
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 11:56
文章分类
文章存档

2009年(5)

2008年(9)

2007年(14)

我的朋友
最近访客

分类:

2008-12-30 17:00:55

#!/bin/sh
# Copyright 2008 (c), YUNIX All rights reserved.
# Filename   : FSourceTDeb.sh
# Description: Built deb package from source
# Author     : John YU
# Version    : 1.0
# Date       : 08-12-29

#apt-get update
#dpkg -P vim-common vim-tiny
Get="apt-get -y --force-yes install "
$Get vim locales automake autoconf
$Get build-essential dh-make devscripts fakeroot

cat /etc/locale.gen | grep "zh_CN.UTF-8"
if [ $? == 1 ]; then
cat << eof >> /tmp/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB2312
zh_CN.GB18030 GB18030
zh_CN.UTF-8 UTF-8
eof
cp -av /tmp/locale.gen /etc/locale.gen
chmod 644  /etc/locale.gen
locale-gen &
fi
rm -fr `pwd`/BuiltRoot2
mkdir -p `pwd`/BuiltRoot2/mysmall-1.0

cd `pwd`/BuiltRoot2/mysmall-1.0
cat <> hellodeb.c
#include
int main(void)
{
printf("hello deb\n");
return 0;
}
eof
cat <> Makefile
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)
eof

tar -czvf mygame-1.0.tar.gz hellodeb.c Makefile

dh_make -s  -e debianyu@163.com  -f mygame-1.0.tar.gz
rm -fr mygame-1.0.tar.gz
debuild -uc -us
pwd && ls
阅读(542) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~