yum: Ship a standalone version of licenses.txt for future code

This commit is contained in:
Richard Hughes 2010-04-20 11:35:22 +01:00
parent 06c0dd3bf4
commit c61e9664ed
3 changed files with 203 additions and 2 deletions

View File

@ -1,6 +1,7 @@
helperdir = $(datadir)/PackageKit/helpers/yum
dist_helper_DATA = \
yum-comps-groups.conf \
licenses.txt \
yumBackend.py \
yumComps.py \
yumMediaManager.py \

187
backends/yum/licenses.txt Normal file
View File

@ -0,0 +1,187 @@
AAL
Adobe
ADSL
AFL
AGPLv1
AMDPLPA
AML
AMPAS BSD
APSL 2.0
ARL
Arphic
Artistic 2.0
Artistic clarified
ASL 1.0
ASL 1.1
ASL 2.0
Baekmuk
BitTorrent
Boost
BSD
BSD Protection
BSD with advertising
CATOSL
CC0
CC-BY
CC-BY-SA
CDDL
CDL
CeCILL
CeCILL-B
CeCILL-C
CNRI
Condor
Copyright only
CPAL
CPL
Crystal Stacker
DOC
DSL
dvipdfm
ECL 1.0
ECL 2.0
eCos
EFL 2.0
Entessa
EPL
ERPL
EUPL 1.1
Eurosym
EU Datagrid
Fair
FBSDDL
Free Art
FTL
GeoGratis
GFDL
Giftware
GL2PS
Glide
gnuplot
GPLv1
GPLv2
GPLv2 or Artistic
GPLv2+
GPLv2+ or Artistic
GPLv2+ with exceptions
GPLv2 with exceptions
GPLv3
GPLv3+
GPLv3+ with exceptions
GPLv3 with exceptions
GPL+
GPL+ or Artistic
GPL+ with exceptions
IBM
IEEE
IJG
ImageMagick
iMatix
Imlib2
Intel ACPI
Interbase
IPA
ISC
Jabber
JasPer
JPython
Knuth
LBNL BSD
LGPLv2
LGPLv2+
LGPLv2+ or Artistic
LGPLv2+ with exceptions
LGPLv2 with exceptions
LGPLv3
LGPLv3+
LGPLv3+ with exceptions
LGPLv3 with exceptions
Liberation
libtiff
LLGPL
Logica
LPL
LPPL
mecab-ipadic
MirOS
MIT
MIT with advertising
mod_macro
Motosoto
mplus
MPLv1.0
MPLv1.1
MS-PL
MS-RL
Naumen
NCSA
NetCDF
Netscape
Newmat
NGPL
Nokia
NOSL
Noweb
OAL
OFL
OFSFDL
OpenLDAP
OpenPBS
OpenSSL
OReilly
OSL 1.0
OSL 1.1
OSL 2.0
OSL 2.1
OSL 3.0
Phorum
PHP
Plexus
PostgreSQL
psutils
PTFL
Public Domain
Public Use
Python
Qhull
QPL
Rdisc
RiceBSD
Romio
RPSL
Ruby
Saxpath
SCEA
SCRIP
Sendmail
SISSL
Sleepycat
SLIB
SNIA
SPL
STIX
TCL
TMate
TOSL
TPL
UCD
Vim
VNLSL
VOSTROM
VSL
W3C
Wadalab
Webmin
WTFPL
wxWidgets
XANO
Xerox
xinetd
XSkat
YPLv1.1
Zend
zlib
zlib with acknowledgement
ZPLv1.0
ZPLv2.0
ZPLv2.1

View File

@ -126,6 +126,7 @@ main (int argc, char *argv[])
gboolean is_col;
GString *string_h = NULL;
GString *string_c = NULL;
GString *string_txt = NULL;
PkRefreshLicenseItem *item;
PkRefreshLicenseItem *item_tmp;
const gchar *locations[] = {
@ -263,8 +264,9 @@ skip:
g_ptr_array_sort (data, pk_refresh_licenses_compare_func);
/* process data, and output to header file */
string_h = g_string_new ("automatically geneated, do not edit\n\n");
string_c = g_string_new ("automatically geneated, do not edit\n\n");
string_h = g_string_new ("automatically geneated, do not edit\n\n");
string_c = g_string_new ("automatically geneated, do not edit\n\n");
string_txt = g_string_new (NULL);
for (i=0; i<data->len; i++) {
gchar *tabs;
guint len;
@ -284,6 +286,7 @@ skip:
/* need to tab properly */
g_string_append_printf (string_c, "\t{%s,%s\"%s\"},\n", item->enum_name, tabs, item->full_name);
g_string_append_printf (string_txt, "%s\n", item->full_name);
g_free (tabs);
}
g_string_append (string_c, "\n");
@ -305,12 +308,22 @@ skip:
goto out;
}
/* set c contents */
ret = g_file_set_contents ("./licenses.txt", string_txt->str, -1, &error);
if (!ret) {
g_warning ("failed to set contents: %s", error->message);
g_error_free (error);
goto out;
}
retval = EXIT_SUCCESS;
out:
if (string_h != NULL)
g_string_free (string_h, TRUE);
if (string_c != NULL)
g_string_free (string_c, TRUE);
if (string_txt != NULL)
g_string_free (string_txt, TRUE);
if (data != NULL)
g_ptr_array_unref (data);
g_string_free (contents, TRUE);