Document: testautotools
Title: Debian testautotools Manual
Author: <insert document author here>
Abstract: This manual describes what testautotools is
and how it can be used to
manage online manuals on Debian systems.
Section: unknown
Format: debiandoc-sgml
Files: /usr/share/doc/testautotools/testautotools.sgml.gz
Format: postscript
Files: /usr/share/doc/testautotools/testautotools.ps.gz
Format: text
Files: /usr/share/doc/testautotools/testautotools.text.gz
Format: HTML
Index: /usr/share/doc/testautotools/html/index.html
Files: /usr/share/doc/testautotools/html/*.html
Format: http://dep.debian.net/deps/dep5
Upstream-Name: testautotools
Source: <url://example.com>
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2014 unknown <user@unknown>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
testautotools (0-1) unstable; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
-- unknown <user@unknown> Tue, 10 Jun 2014 12:42:30 +0800
#!/usr/bin/make -f# -*- makefile -*-# Sample debian/rules that uses debhelper.# This file was originally written by Joey Hess and Craig Small.# As a special exception, when this file is copied by dh-make into a# dh-make output file, you may use that output file without restriction.# This special exception was added by Craig Small in version 0.37 of dh-make.# Uncomment this to turn on verbose mode.#export DH_VERBOSE=1%: dh $@
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"complete -F _quilt_completion $_quilt_complete_opt dquilt
新增~/.quiltrc-dpkg
~/.quiltrc-dpkg
1234567891011
d=. ; while [ ! -d $d/debian -a $(readlink -e $d) != / ]; do d=$d/..; done
if [ -d $d/debian ] && [ -z $QUILT_PATCHES ]; then
## if in Debian packaging tree with unset $QUILT_PATCHES
QUILT_PATCHES="debian/patches"
QUILT_PATCH_OPTS="--reject-format=unified"
QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
fi
cmake_minimum_required(VERSION2.8)macro(mac_printmsg)set(mac"macro")message("${mac}: ${msg}")endmacro(mac_print)function(func_printmsg)set(func"func")message("${func}: ${msg}")endfunction(func_print)mac_print("test macro")message("check var in macro: ${mac}")func_print("test function")message("check var in function: ${func}")
cmake_minimum_required(VERSION2.8)# Project dataproject(testcmake)# Directoriesset(SRC_DIRsrc)set(LIB_DIRlibs)set(INC_DIRinclude)# Release modeset(CMAKE_BUILD_TYPEDebug)# Compile flagsset(CMAKE_C_FLAGS"-Wall -Werror")# I like verbose, must after project, do not know whyset(CMAKE_VERBOSE_MAKEFILEtrue)# Where to include?include_directories(${INC_DIR})# Files to compileset(test_SRCS${SRC_DIR}/test.c${LIB_DIR}/liba.c${LIB_DIR}/libb.c)add_executable(${PROJECT_NAME}${test_SRCS})
cmake_minimum_required(VERSION2.8)# Project dataproject(testcmake)# Directoriesset(SRC_DIRsrc)set(LIB_DIRlibs)set(INC_DIRinclude)# Release modeset(CMAKE_BUILD_TYPEDebug)# Compile flagsset(CMAKE_C_FLAGS"-Wall -Werror")# I like verbose, must after project, do not know whyset(CMAKE_VERBOSE_MAKEFILEtrue)# Where to include?include_directories(${INC_DIR})# Build librariesset(liba_SRCS${LIB_DIR}/liba.c)set(libb_SRCS${LIB_DIR}/libb.c)add_library(aSHARED${liba_SRCS})add_library(bSHARED${libb_SRCS})# Build binaryset(test_SRCS${SRC_DIR}/test.c)add_executable(${PROJECT_NAME}${test_SRCS})target_link_libraries(${PROJECT_NAME}ab)
cmake_minimum_required(VERSION2.8)# Project dataproject(testcmake)# Directoriesset(SRC_DIRsrc)set(LIB_DIRlibs)set(INC_DIRinclude)# Release modeset(CMAKE_BUILD_TYPEDebug)# Compile flagsset(CMAKE_C_FLAGS"-Wall -Werror")# I like verbose, must after project, do not know whyset(CMAKE_VERBOSE_MAKEFILEtrue)# Where to include?include_directories(${INC_DIR})# Build library in libs directory or not?# Dive into libs directoryadd_subdirectory(${SRC_DIR})add_subdirectory(${LIB_DIR})
libs/CMakeLists.txt
libs/CMakeLists.txt
123456
# Build binary, inherit setting from parentset(liba_SRCSliba.c)set(libb_SRCSlibb.c)add_library(a${liba_SRCS})add_library(b${libb_SRCS})
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <locale.h>#include <libintl.h>#define MAX_CHAR (32)intmain(intargc,char**argv){chardest[MAX_CHAR];chartransport[MAX_CHAR];/* Init gettext related APIs*/setlocale(LC_ALL,"");bindtextdomain(PACKAGE,LOCALEDIR);textdomain(PACKAGE);/*- Set up strings */strncpy(dest,gettext("Taipei"),MAX_CHAR);strncpy(transport,gettext("bus"),MAX_CHAR);/*- Let's print out some message */printf(gettext("I will go to %s by %s.\n"),dest,transport);return0;}
# SOME DESCRIPTIVE TITLE.# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER# This file is distributed under the same license as the PACKAGE package.# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.##, fuzzymsgid""msgstr"""Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2014-05-30 23:11+0800\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""Language: \n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=CHARSET\n""Content-Transfer-Encoding: 8bit\n"#. - Set up strings#: test_gettext.c:22msgid"Taipei"msgstr""#: test_gettext.c:23msgid"bus"msgstr""#. - Let's print out some message#: test_gettext.c:26#, c-formatmsgid"I will go to %s by %s\n"msgstr""
# Chinese translations for PACKAGE package.# Copyright (C) 2014 THE PACKAGE'S COPYRIGHT HOLDER# This file is distributed under the same license as the PACKAGE package.# Automatically generated, 2014.#msgid""msgstr"""Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2014-05-30 23:03+0800\n""PO-Revision-Date: 2014-05-30 23:03+0800\n""Last-Translator: Automatically generated\n""Language-Team: none\n""Language: zh_TW\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. - Set up strings#: test_gettext.c:22msgid"Taipei"msgstr"台北"#: test_gettext.c:23msgid"bus"msgstr"公車"#. - Let's print out some message#: test_gettext.c:26#, c-formatmsgid"I will go to %s by %s.\n"msgstr"我搭乘%2$s到%1$s。\n"