<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    開源LGPL——如何宣告自己的程式為自由軟件

    這里使用LGPL協(xié)議為例簡單說明一下如何將自己的程序宣告為開源軟件
    首先確定自己要使用的開源協(xié)議,這里選擇LGPL(關(guān)于其它協(xié)議及協(xié)議的詳細(xì)內(nèi)容,請參考其它資料),
    然后確定并準(zhǔn)備以下幾部分內(nèi)容:

    • 一份版權(quán)信息聲明文件,一般命名為"NOTICE"
    • 一份所使用的協(xié)議的副本.
    • 如果程序為多個文件構(gòu)成,則在每個文件中包含文件頭信息,聲明協(xié)議及版權(quán)信息

    一般來說主要就是由以上幾部分組成,下面簡單說明一下相關(guān)組成部分。

    1.首先,對于版權(quán)信息聲明文件,我們可以寫一份文本文檔,一般命名為NOTICE, 其中包含版權(quán)聲明及一些自己想要聲明的信息,示例如:
    Copyright 1998, 1999 Terry Jones
    用于聲明軟件的發(fā)布年份及作者姓名,一般建議分別列出每個年份,不一定需要符號©, 最簡單的NOTICE,包含這些內(nèi)容就可以了。
    但是一般建議應(yīng)該包含以下一些信息:
    a) 軟件作者聯(lián)系信息,用于在必要時聯(lián)系作者

    b) 獲取軟件源碼的地址,當(dāng)發(fā)布為二進(jìn)制時,可以告訴用戶在那里可以獲得軟件的源碼。

    c) 其它開源組件庫的開源協(xié)議及源碼地址,如果你所分發(fā)的軟件使用了其它開源產(chǎn)品,則應(yīng)該同時包含他們的開源協(xié)議以及相應(yīng)的源碼地址。

    2. 一份軟件的使用協(xié)議,這里我們使用LGPL(GNU Lesser General Public License)為例說明.
    我們需要在(一般為軟件所在的根目錄下)包含這兩個文件:

    a) 一份GPL的協(xié)議副本,一般命名為COPYING, 你可以從這里獲得相關(guān)的協(xié)議副本 http://www.gnu.org/licenses/gpl.txt

    b) 一份LGPL協(xié)議副本,一般命名為COPYING.LESSER, 可以從這里獲得相關(guān)的協(xié)議副本 http://www.gnu.org/licenses/lgpl.txt

    如果軟件發(fā)布在GPL下,則只需要一份GPL協(xié)議副本就可以,如果為LGPL則應(yīng)該同時包含GPL及LGPL兩個協(xié)議副本。

    3.如果程序為多個文件源文件構(gòu)成,則在每個文件中包含文件頭信息,聲明協(xié)議及版權(quán)信息.

    來自gnu.org的示例文本如下:
        This file is part of Foobar.
    Foobar is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    Foobar 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 Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

    上面是以LGPL為例說明的. 更詳細(xì)的信息可以參考這里 http://www.gnu.org/licenses/gpl-howto.html

    下面是我的使用示例,以下信息僅供參考:

    文件目錄

    NOTICE文件如下

     01 /*
     02  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     03  *
     04  * Copyright 2010 huliqing, huliqing.cn@gmail.com
     05  *
     06  * 
     07  * QBlog is free software: you can redistribute it and/or modify
     08  * it under the terms of the GNU Lesser General Public License as published by
     09  * the Free Software Foundation, either version 3 of the License, or
     10  * (at your option) any later version.
     11  *
     12  * QBlog is distributed in the hope that it will be useful,
     13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15  * GNU Lesser General Public License for more details.
     16  *
     17  * You should have received a copy of the GNU Lesser General Public License
     18  * along with QBlog.  If not, see <http://www.gnu.org/licenses/>.
     19  *
     20  * QBlog是一個自由軟件,您可以自由分發(fā)、修改其中的源代碼或者重新發(fā)布它,
     21  * 新的任何修改后的重新發(fā)布版必須同樣在遵守LGPL3或更后續(xù)的版本協(xié)議下發(fā)布.
     22  * 關(guān)于LGPL協(xié)議的細(xì)則請參考COPYING、COPYING.LESSER文件,
     23  * 您可以在QBlog的相關(guān)目錄中獲得LGPL協(xié)議的副本,
     24  * 如果沒有找到,請連接到 http://www.gnu.org/licenses/ 查看。
     25  *
     26  * - Author: Huliqing
     27  * - Contact: huliqing.cn@gmail.com
     28  * - License: GNU Lesser General Public License (LGPL)
     29  * - Blog and source code availability: http://www.huliqing.name/
     30  */
     31 
     32 
     33 LICENSE INFORMATION REGARDING BUNDLED THIRD-PARTY SOFTWARE
     34 
     35 
     36 
     37 The following third party software is distributed with the QBlog and is provided
     38 under other 
     39 licenses and/or has source available from other locations. 
     40 
     41 * JSF Frameworker
     42     License: CDDLv.1.0 + GPL v.2.0
     43     Source code availability: https://javaserverfaces.dev.java.net/
     44     
     45     lib/jsf-api.jar
     46     lib/jsf-impl.jar
     47 
     48 * Jakarta Taglibs
     49     
     50     License: Apache License v. 2.0 
     51     
     52     Source code availability: http://jakarta.apache.org/taglibs/
     53     lib/standard-1.1.2.jar
     54     
     55     lib/jstl-1.1.2.jar
     56 
     57 * DataNucleus Access Platform
     58     
     59     License: Apache License v. 2.0
     60     
     61     Source code availability: http://www.datanucleus.org/
     62         
     63     lib/datanucleus-core-1.1.5.jar
     64     
     65     lib/datanucleus-jpa-1.1.5.jar
     66 
     67 
     68 * Xml
     69     License: Apache License v. 2.0
     70     
     71     Apache Software Foundation (http://xml.apache.org/commons)
     72     David Megginson, Simple API for XML (http://www.saxproject.org)
     73     World Wide Web Consortium, xml-commons for http://xml.apache.org/ subproject (http://www.w3c.org/DOM)
     74     Sun Microsystems Inc., JSR 206, Java API for XML Processing 1.3(http://java.sun.com/xml/jaxp.html)
     75     lib/xml-apis.jar
     76     lib/xalan.jar
     77     lib/xsltc.jar
     78     lib/serializer.jar
     79     lib/xercesImpl.jar
     80 
     81 * el
     82     JSP 2.1's EL API, as used by JSF 2.0
     83     SUN (http://java.sun.com/products/jsp)
     84     lib/el-api-1.1.jar
     85     lib/el-impl-1.1.jar
     86 
     87 * QFaces
     88     License: LGPL v. 3.0
     89     Source code availability: http://www.huliqing.name/
     90     lib/qfaces-2.0.2.jar
     91 
     92 * huliqing-common
     93     No license and no source code, free use.
     94     lib/huliqing-common-1.1.jar
     95 
     96     
     97     
     98

    文件頭信息參考如下:


     01 /*
     02  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     03  *
     04  * Copyright 2010 huliqing, huliqing.cn@gmail.com
     05  *
     06  * This file is part of QBlog.
     07  * QBlog is free software: you can redistribute it and/or modify
     08  * it under the terms of the GNU Lesser General Public License as published by
     09  * the Free Software Foundation, either version 3 of the License, or
     10  * (at your option) any later version.
     11  *
     12  * QBlog is distributed in the hope that it will be useful,
     13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15  * GNU Lesser General Public License for more details.
     16  *
     17  * You should have received a copy of the GNU Lesser General Public License
     18  * along with QBlog.  If not, see <http://www.gnu.org/licenses/>.
     19  *
     20  * 這個文件是QBlog的一部分。
     21  * 您可以單獨使用或分發(fā)這個文件,但請不要移除這個頭部聲明信息.
     22  * QBlog是一個自由軟件,您可以自由分發(fā)、修改其中的源代碼或者重新發(fā)布它,
     23  * 新的任何修改后的重新發(fā)布版必須同樣在遵守LGPL3或更后續(xù)的版本協(xié)議下發(fā)布.
     24  * 關(guān)于LGPL協(xié)議的細(xì)則請參考COPYING、COPYING.LESSER文件,
     25  * 您可以在QBlog的相關(guān)目錄中獲得LGPL協(xié)議的副本,
     26  * 如果沒有找到,請連接到 http://www.gnu.org/licenses/ 查看。
     27  *
     28  * - Author: Huliqing
     29  * - Contact: huliqing.cn@gmail.com
     30  * - License: GNU Lesser General Public License (LGPL)
     31  * - Blog and source code availability: http://www.huliqing.name/
     32  */
     33 
     34 package name.huliqing.qblog;
     35 
     36 import java.text.SimpleDateFormat;
     37 import java.util.Date;
     38 import java.util.TimeZone;
     39 import java.util.logging.Logger;
     40 import javax.servlet.ServletContextEvent;
     41 import javax.servlet.ServletContextListener;
     42 import name.huliqing.qblog.service.MailSe;
     43 
    -44 public class ContextListener implements ServletContextListener {
     45     private final static Logger logger = Logger.getLogger(ContextListener.class.getName());
     46 
    -47     public void contextDestroyed(ServletContextEvent arg0) {
     48         logger.info("QBlog Shutdown");
     49         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     50         sdf.setTimeZone(TimeZone.getTimeZone("GMT+8"));
     51         MailSe.sendToSelf("QBlog shutdown at:" + sdf.format(new Date()), "QBlog shutdown.");
     52     
    }
     53 
    -54     public void contextInitialized(ServletContextEvent arg0) {
     55         logger.info("QBlog Start...");
     56     
    }
     57 
     58 
    }
     59






    - huliqing@huliqing.name
    - http://www.huliqing.name

    posted on 2010-09-29 14:44 huliqing 閱讀(3349) 評論(0)  編輯  收藏 所屬分類: QBlog

    導(dǎo)航

    統(tǒng)計

    公告

    文章原創(chuàng),歡迎轉(zhuǎn)載
    ——轉(zhuǎn)載請注明出處及原文鏈接

    隨筆分類(60)

    隨筆檔案(33)

    最新評論

    評論排行榜

    主站蜘蛛池模板: 亚洲日韩乱码中文无码蜜桃| 久久免费观看国产99精品| 亚洲男人天堂av| 亚洲国产精品成人久久蜜臀| 永久免费AV无码国产网站| 野花香高清视频在线观看免费| 男男gay做爽爽的视频免费| 亚洲最新中文字幕| 亚洲爆乳无码专区| 亚洲精品国精品久久99热| 午夜无遮挡羞羞漫画免费| 0588影视手机免费看片| 久久99精品国产免费观看| 成在人线av无码免费高潮水| 特a级免费高清黄色片| 国产亚洲人成在线播放| 亚洲偷自拍另类图片二区| 亚洲啪啪免费视频| 久久av无码专区亚洲av桃花岛| 亚洲国产精品一区第二页| 不卡一卡二卡三亚洲| 亚洲国产成人影院播放| 亚洲av无码成人精品区在线播放| 日韩在线免费电影| 全免费a级毛片免费看无码| 久久这里只有精品国产免费10| 99无码人妻一区二区三区免费| 精品免费人成视频app| 99久久免费精品高清特色大片| 一级毛片全部免费播放| 久久青草免费91线频观看不卡 | 真实国产乱子伦精品免费| 嫩草在线视频www免费观看| 大地资源中文在线观看免费版| 中国内地毛片免费高清| 免费看成人AA片无码视频吃奶| 中文字幕av无码不卡免费| 免费黄网站在线看| 日韩免费人妻AV无码专区蜜桃| 91福利免费视频| 97国产免费全部免费观看|