Commit 60596735 authored by Richard Hughes's avatar Richard Hughes
Browse files

Add framework code for the gnome-software application

parent 32379f26
Richard Hughes <richard@hughsie.com>
Richard Hughes <richard@hughsie.com>
SUBDIRS = \
po \
src
snapshot:
$(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
DISTCLEANFILES = \
gnome-software-*.tar.xz
MAINTAINERCLEANFILES = \
*~ \
aclocal.m4 \
ChangeLog \
compile \
config.guess \
config.h.* \
config.sub \
configure \
depcomp \
INSTALL \
install-sh \
ltmain.sh \
Makefile.in \
missing \
mkinstalldirs \
omf.make \
xmldocs.make
EXTRA_DIST = \
AUTHORS \
autogen.sh \
config.h \
COPYING \
INSTALL \
MAINTAINERS \
NEWS \
README
DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc --disable-tests
distclean-local:
if test $(srdcir) = .; then :; else \
rm -f ChangeLog; \
fi
ChangeLog:
@echo Creating $@
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log 40b7dc172740c49933139d950b72aab5549df92e.. --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
.PHONY: ChangeLog
-include $(top_srcdir)/git.mk
#!/bin/sh
# Copyright (C) 2009 Richard Hughes <richard@hughsie.com>
#
# Run this to generate all the initial makefiles, etc.
#
# Licensed under the GNU General Public License Version 2
# This program 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.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory \"\'$srcdir\'\" does not look like the"
echo " top-level package directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common!"
exit 1
}
REQUIRED_AUTOMAKE_VERSION=1.7 GNOME_DATADIR="$gnome_datadir" USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
# Copyright (C) 2010-2012 Richard Hughes <richard@hughsie.com>
AC_PREREQ(2.63)
AC_INIT([gnome-software],[3.5.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-software])
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# enable nice build output on automake1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AS_ALL_LINGUAS
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
LT_INIT
AM_PROG_CC_C_O
IT_PROG_INTLTOOL([0.35.0])
#YELP_HELP_INIT
#GNOME_COMPILE_WARNINGS(error)
#GNOME_DOC_INIT
dnl ---------------------------------------------------------------------------
dnl - Extra verbose warning switches
dnl ---------------------------------------------------------------------------
if test "$GCC" = "yes"; then
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wall"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wcast-align -Wno-uninitialized"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-declarations"
# WARNINGFLAGS_C="$WARNINGFLAGS_C -Wredundant-decls"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wpointer-arith"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wcast-align"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wwrite-strings"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Winit-self"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wreturn-type"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wformat-nonliteral"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wformat-security"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-include-dirs"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-format-attribute"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wclobbered"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wempty-body"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wignored-qualifiers"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wsign-compare"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wtype-limits"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wuninitialized"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Waggregate-return"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wdeclaration-after-statement"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wshadow"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wno-strict-aliasing"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Winline"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Wmissing-parameter-type"
WARNINGFLAGS_C="$WARNINGFLAGS_C -Woverride-init"
else
WARNINGFLAGS_C=""
fi
AC_SUBST(WARNINGFLAGS_C)
dnl ---------------------------------------------------------------------------
dnl - gettext stuff
dnl ---------------------------------------------------------------------------
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [foo])
AM_GLIB_GNU_GETTEXT
GLIB_GSETTINGS
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.31.10 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9)
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.91.0)
PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2 >= 0.7.5)
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/Makefile
])
AC_OUTPUT
dnl ==========================================================================
echo "
gnome-software $VERSION
================================
prefix: ${prefix}
datadir: ${datadir}
compiler: ${CC}
cflags: ${CFLAGS}
cppflags: ${CPPFLAGS}
"
%define alphatag #ALPHATAG#
Summary: Software management tools for GNOME
Name: gnome-software
Version: #VERSION#
Release: 0.#BUILD#%{?alphatag}%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://projects.gnome.org/gnome-software/
Source0: http://download.gnome.org/sources/gnome-software/3.5/%{name}-%{version}.tar.xz
Requires: gnome-icon-theme
BuildRequires: gtk3-devel >= 3.0.0
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: glib2-devel >= 2.25.9-2
Requires(post): /usr/bin/gtk-update-icon-cache
Requires(postun): /usr/bin/gtk-update-icon-cache
# obsolete sub-package
Obsoletes: gnome-software-devel <= 3.1.1
%description
gnome-software is an application that makes it easy to add, remove
and update software in the GNOME desktop.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %name --with-gnome
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :
%postun
if [ $1 -eq 0 ]; then
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%{_bindir}/gnome-software
#%dir %{_datadir}/gnome-software
#%{_datadir}/icons/hicolor/*/*/*.png
#%{_datadir}/icons/hicolor/scalable/*/*.svg*
%{_datadir}/applications/gnome-software.desktop
%changelog
* #LONGDATE# Richard Hughes <richard@hughsie.com> #VERSION#-0.#BUILD##ALPHATAG#
- Update from GIT
# git.mk
#
# Copyright 2009, Red Hat, Inc.
# Written by Behdad Esfahbod
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
#
# The canonical source for this file is pango/git.mk, or whereever the
# header of pango/git.mk suggests in the future.
#
# To use in your project, import this file in your git repo's toplevel,
# then do "make -f git.mk". This modifies all Makefile.am files in
# your project to include git.mk.
#
# This enables automatic .gitignore generation. If you need to ignore
# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
# But think twice before doing that. If a file has to be in .gitignore,
# chances are very high that it's a generated file and should be in one
# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
#
# The only case that you need to manually add a file to GITIGNOREFILES is
# when remove files in one of mostlyclean-local, clean-local, distclean-local,
# or maintainer-clean-local.
#
# Note that for files like editor backup, etc, there are better places to
# ignore them. See "man gitignore".
#
# If "make maintainer-clean" removes the files but they are not recognized
# by this script (that is, if "git status" shows untracked files still), send
# me the output of "git status" as well as your Makefile.am and Makefile for
# the directories involved.
#
# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
# pango/Makefile.am.
#
# Don't EXTRA_DIST this file. It is supposed to only live in git clones,
# not tarballs. It serves no useful purpose in tarballs and clutters the
# build dir.
#
# This file knows how to handle autoconf, automake, libtool, gtk-doc,
# gnome-doc-utils, mallard, intltool, gsettings.
#
#
# KNOWN ISSUES:
#
# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
# submodule doesn't find us. If you have configure.{in,ac} files in
# subdirs, add a proxy git.mk file in those dirs that simply does:
# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste.
# And add those files to git. See vte/gnome-pty-helper/git.mk for
# example.
#
# ChangeLog
#
# - 2010-12-06 Add support for Mallard docs
# - 2010-12-06 Start this change log
git-all: git-mk-install
git-mk-install:
@echo Installing git makefile
@any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
if grep 'include .*/git.mk' $$x >/dev/null; then \
echo $$x already includes git.mk; \
else \
failed=; \
echo "Updating $$x"; \
{ cat $$x; \
echo ''; \
echo '-include $$(top_srcdir)/git.mk'; \
} > $$x.tmp || failed=1; \
if test x$$failed = x; then \
mv $$x.tmp $$x || failed=1; \
fi; \
if test x$$failed = x; then : else \
echo Failed updating $$x; >&2 \
any_failed=1; \
fi; \
fi; done; test -z "$$any_failed"
.PHONY: git-all git-mk-install
### .gitignore generation
$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(AM_V_GEN) \
{ \
if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
for x in \
$(DOC_MODULE)-decl-list.txt \
$(DOC_MODULE)-decl.txt \
tmpl/$(DOC_MODULE)-unused.sgml \
"tmpl/*.bak" \
xml html \
; do echo /$$x; done; \
fi; \
if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
for x in \
$(_DOC_C_DOCS) \
$(_DOC_LC_DOCS) \
$(_DOC_OMF_ALL) \
$(_DOC_DSK_ALL) \
$(_DOC_HTML_ALL) \
$(_DOC_MOFILES) \
$(_DOC_POFILES) \
$(DOC_H_FILE) \
"*/.xml2po.mo" \
"*/*.omf.out" \
; do echo /$$x; done; \
fi; \
if test "x$(gsettings_SCHEMAS)" = x; then :; else \
for x in \
$(gsettings_SCHEMAS:.xml=.valid) \
$(gsettings__enum_file) \
; do echo /$$x; done; \
fi; \
if test -f $(srcdir)/po/Makefile.in.in; then \
for x in \
po/Makefile.in.in \
po/Makefile.in \
po/Makefile \
po/POTFILES \
po/stamp-it \
po/.intltool-merge-cache \
"po/*.gmo" \
"po/*.mo" \
po/$(GETTEXT_PACKAGE).pot \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
; do echo /$$x; done; \
fi; \
if test -f $(srcdir)/configure; then \
for x in \
autom4te.cache \
configure \
config.h \
stamp-h1 \
libtool \
config.lt \
; do echo /$$x; done; \
fi; \
for x in \
.gitignore \
$(GITIGNOREFILES) \
$(CLEANFILES) \
$(PROGRAMS) \
$(check_PROGRAMS) \
$(EXTRA_PROGRAMS) \
$(LTLIBRARIES) \
so_locations \
.libs _libs \
$(MOSTLYCLEANFILES) \
"*.$(OBJEXT)" \
"*.lo" \
$(DISTCLEANFILES) \
$(am__CONFIG_DISTCLEAN_FILES) \
$(CONFIG_CLEAN_FILES) \
TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
"*.tab.c" \
$(MAINTAINERCLEANFILES) \
$(BUILT_SOURCES) \
$(DEPDIR) \
Makefile \
Makefile.in \
"*.orig" \
"*.rej" \
"*.bak" \
"*~" \
".*.sw[nop]" \
".dirstamp" \
; do echo /$$x; done; \
} | \
sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
sed 's@/[.]/@/@g' | \
LC_ALL=C sort | uniq > $@.tmp && \
mv $@.tmp $@;
all: $(srcdir)/.gitignore gitignore-recurse-maybe
gitignore-recurse-maybe:
@if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
$(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
fi;
gitignore-recurse:
@for subdir in $(DIST_SUBDIRS); do \
case " $(SUBDIRS) " in \
*" $$subdir "*) :;; \
*) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \
esac; \
done
gitignore: $(srcdir)/.gitignore gitignore-recurse
maintainer-clean: gitignore-clean
gitignore-clean:
-rm -f $(srcdir)/.gitignore
.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">GNOME Software</name>
<shortdesc xml:lang="en">GNOME Software Tools</shortdesc>
<description xml:lang="en">
GNOME SOftware is for installing, removing and updating software.
</description>
<homepage rdf:resource="http://projects.gnome.org/gnome-software/" />
<maintainer>
<foaf:Person>
<foaf:name>Richard Hughes</foaf:name>
<foaf:mbox rdf:resource="mailto:richard@hughsie.com" />
<foaf:homepage rdf:resource="http://www.hughsie.com/" />
<gnome:userid>rhughes</gnome:userid>
</foaf:Person>
</maintainer>
<license rdf:resource="http://www.gnu.org/licenses/gpl-2.0.txt" />
<bug-database rdf:resource="http://bugzilla.gnome.org/" />
</Project>
# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
# subset of the po files.
AC_DEFUN([AS_ALL_LINGUAS],
[
AC_MSG_CHECKING([for linguas])
podir="m4_default([$1],[$srcdir/po])"
linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
if test -f "$podir/LINGUAS.ignore"; then
ALL_LINGUAS="";
ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
-e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
for lang in $linguas; do
if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
ALL_LINGUAS="$ALL_LINGUAS $lang";
fi;
done;
else
ALL_LINGUAS="$linguas";
fi;
AC_SUBST([ALL_LINGUAS])
AC_MSG_RESULT($ALL_LINGUAS)
])
src/gnome-software.desktop.in
src/gs-main.c
[type: gettext/glade]src/gnome-software.ui
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Richard Hughes <richard@hughsie.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: gnome-software\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-05-09 22:55+0100\n"
"PO-Revision-Date: 2012-05-09 21:57+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.net/projects/p/freedesktop/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../src/gnome-software.desktop.in.h:1 ../src/gnome-software.ui.h:1
msgid "Software"
msgstr "Software"
#: ../src/gnome-software.desktop.in.h:2
msgid "Add, remove or update software on this computer"
msgstr "Add, remove or update software on this computer"
INCLUDES = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(PACKAGEKIT_CFLAGS) \
-DG_LOG_DOMAIN=\"Gs\" \
-DBINDIR=\"$(bindir)\" \
-DDATADIR=\"$(datadir)\" \
-DVERSION="\"$(VERSION)\"" \
-DLOCALEDIR=\""$(localedir)"\" \
-DGS_DATA=\"$(pkgdatadir)\"
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = \
gnome-software.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
UI_FILES = \
gnome-software.ui
bin_PROGRAMS = \
gnome-software
gnome_software_SOURCES = \
gs-resources.c \
gs-resources.h \
gs-main.c
gnome_software_LDADD = \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(PACKAGEKIT_LIBS) \
-lm
gnome_software_CFLAGS = \
$(WARNINGFLAGS_C)
gs-resources.c: gnome-software.gresource.xml ./gnome-software.ui
glib-compile-resources --target=$@ --generate-source --c-name gs $(srcdir)/gnome-software.gresource.xml
gs-resources.h: gnome-software.gresource.xml
glib-compile-resources --target=$@ --generate-header --c-name gs $(srcdir)/gnome-software.gresource.xml
BUILT_SOURCES = \
gs-resources.c \
gs-resources.h
EXTRA_DIST = \
gnome-software.gresource.xml \
$(desktop_in_files) \
$(UI_FILES)
clean-local:
rm -f *~
CLEANFILES = $(BUILT_SOURCES)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in
DISTCLEANFILES = \
gnome-software.desktop
-include $(top_srcdir)/git.mk
[Desktop Entry]
_Name=Software
_Comment=Add, remove or update software on this computer
Icon=gnome-software
Exec=gnome-software
Terminal=false
Type=Application
Categories=GNOME;GTK;System;
StartupNotify=true
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-software