diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-18 10:15:33 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-18 10:15:33 +0000 |
| commit | fb61348c10fdad40ce2fb2c114ff606f0db1ce1b (patch) | |
| tree | dd46c86bd17e594bc57d381e3e8c68b82c06b727 | |
| parent | a974a2996a7d5a6423e2c4fe5cc477402a49e4b7 (diff) | |
| download | sigen-fb61348c10fdad40ce2fb2c114ff606f0db1ce1b.tar.gz sigen-fb61348c10fdad40ce2fb2c114ff606f0db1ce1b.tar.xz sigen-fb61348c10fdad40ce2fb2c114ff606f0db1ce1b.zip | |
[FIX] RPM now builds successfully
[FIX] Documentation will be built correctly
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@148 6ecfd1a5-f3ed-3746-8530-beee90d26b22
| -rw-r--r-- | Changelog | 8 | ||||
| -rw-r--r-- | general/general.pro | 7 | ||||
| -rwxr-xr-x | pokegen.pro | 4 | ||||
| -rw-r--r-- | pokegen.spec | 76 | ||||
| -rw-r--r-- | pokegen/pokegen.pro | 22 | ||||
| -rw-r--r-- | pokemod/pokemod.pro | 7 | ||||
| -rw-r--r-- | pokemodr/pokemodr.pro | 28 |
7 files changed, 120 insertions, 32 deletions
@@ -1,4 +1,12 @@ ----------------- +Rev: 148 +Date: 18 May 2008 +User: MathStuf +----------------- +[FIX] RPM now builds successfully +[FIX] Documentation will be built correctly + +----------------- Rev: 147 Date: 18 May 2008 User: MathStuf diff --git a/general/general.pro b/general/general.pro index 73405b21..ccb72fc5 100644 --- a/general/general.pro +++ b/general/general.pro @@ -1,3 +1,4 @@ +VERSION = 0.0.1 TEMPLATE = lib OBJECTS_DIR = .obj DESTDIR = ../bin @@ -19,10 +20,10 @@ HEADERS += Flag.h \ Point.h isEmpty(PREFIX) { - PREFIX = $$(PREFIX)/lib + PREFIX = $$(PREFIX) } isEmpty(PREFIX) { - PREFIX = /usr/lib`kde4-config --libsuffix` + PREFIX = /usr } -target.path = $$PREFIX +target.path = $$PREFIX/lib$$system(kde4-config --libsuffix) INSTALLS += target diff --git a/pokegen.pro b/pokegen.pro index 7e1bf9de..b4a56761 100755 --- a/pokegen.pro +++ b/pokegen.pro @@ -12,6 +12,10 @@ SUBDIRS = general \ pokemod \ pokemodr +pokemod.depends = general +pokemodr.depends = pokemod \ + general + distsrc.target = distsrc distsrc.commands = ./make-tarball.sh $${VERSION} diff --git a/pokegen.spec b/pokegen.spec index d457f332..d7ccd222 100644 --- a/pokegen.spec +++ b/pokegen.spec @@ -6,8 +6,7 @@ Summary: PokéGen is a game engine aiming to emulate the original Pokémo Group: Amusements/Games License: GPLv3+ URL: http://www.sourceforge.net/projects/pokegen -Source0: pokegen-%{version}.tar.bz2 -Source1: pokemodr.desktop +Source: pokegen-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: kdelibs4-devel tetex-latex desktop-file-utils @@ -29,9 +28,51 @@ make %{?_smp_mflags} rm -rf %{buildroot} mkdir %{buildroot} make INSTALL_ROOT=%{buildroot} install -desktop-file-install --vendor="fedora" \ - --dir=%{buildroot}%{_datadir}/applications \ - %{SOURCE1} +# Following is based off of KTIGCC's .spec file +# PokeModr menu entry +mkdir -p %{buildroot}%{_datadir}/applications +cat > %{buildroot}%{_datadir}/applications/pokemodr.desktop << EOF1 +[Desktop Entry] +Name=PokéModr +Comment=Program to edit PokéMods +GenericName=Program to edit PokéMods +Encoding=UTF-8 +Type=Application +Exec=%{_bindir}/pokemodr %U +Icon=pokemodr +Terminal=false +Categories=Qt;KDE;Game; +MimeType=application/x-pokemod+xml; +EOF1 +desktop-file-install --delete-original --vendor pokegen \ + --dir=%{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/pokemodr.desktop +# GNOME (shared-mime-info) MIME type registration +mkdir -p %{buildroot}%{_datadir}/mime/packages +cat > %{buildroot}%{_datadir}/mime/packages/pokemodr.xml << EOF2 +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-pokemod+xml"> + <sub-class-of type="application/xml" /> + <comment>PokéMod</comment> + <glob pattern="*.[pP][mM][oO][dD]" /> + </mime-type> +</mime-info> +EOF2 +# KDE (legacy) MIME type registration +mkdir -p %{buildroot}%{_datadir}/mimelnk/application +cat > %{buildroot}%{_datadir}/mimelnk/application/x-pokemod+xml.desktop << EOF3 +[Desktop Entry] +Encoding=UTF-8 +Type=MimeType +MimeType=application/x-pokemod+xml +Icon=application-x-pokemod+xml +Patterns=*.pmod;*.PMOD; +Comment=PokéMod +[Property::X-KDE-text] +Type=bool +Value=true +EOF3 %clean @@ -40,12 +81,29 @@ rm -rf ${buildroot} %files %defattr(-,root,root,-) -%doc /usr/share/doc/pokegen-%{version}/DISCLAIMER -%doc /usr/share/doc/pokegen-%{version}/LICENSE -%doc /usr/share/doc/pokegen-%{version}/pokemodr.pdf -/usr/bin/pokemodr +%doc /usr/share/doc/%{name}-%{version}/DISCLAIMER +%doc /usr/share/doc/%{name}-%{version}/LICENSE +%doc /usr/share/doc/%{name}-%{version}/pokemodr.pdf +%{_bindir}/pokemodr %{_libdir}/libgeneral.so +%{_libdir}/libgeneral.so.0 +%{_libdir}/libgeneral.so.0.0 +%{_libdir}/libgeneral.so.0.0.1 %{_libdir}/libpokemod.so +%{_libdir}/libpokemod.so.0 +%{_libdir}/libpokemod.so.0.0 +%{_libdir}/libpokemod.so.0.0.1 +%{_datadir}/%{name}/overlays/effect.png +%{_datadir}/%{name}/overlays/no-walk.png +%{_datadir}/%{name}/overlays/overlays.qrc +%{_datadir}/%{name}/overlays/trainer.png +%{_datadir}/%{name}/overlays/walk.png +%{_datadir}/%{name}/overlays/warp.png +%{_datadir}/%{name}/overlays/water.png +%{_datadir}/%{name}/overlays/wilds.png +%{_datadir}/applications/pokegen-pokemodr.desktop +%{_datadir}/mime/packages/pokemodr.xml +%{_datadir}/mimelnk/application/x-pokemod+xml.desktop %changelog diff --git a/pokegen/pokegen.pro b/pokegen/pokegen.pro index 47d45777..9da961d5 100644 --- a/pokegen/pokegen.pro +++ b/pokegen/pokegen.pro @@ -13,14 +13,20 @@ TARGETDEPS += ../lib/libpokemod.so \ ../lib/libgeneral.so \ ../lib/libbattle.so -doc.target = doc -doc.commands = pdflatex pokegen.tex && \ - pdflatex pokegen.tex && \ - rm -f pokegen.aux pokegen.log pokegen.out pokegen.toc && \ - mkdir ../doc && \ - mv pokegen.pdf ../doc/pokegen.pdf +LATEX += pokegen.tex -QMAKE_EXTRA_UNIX_TARGETS += doc +QMAKE_FILETAGS += LATEX + +pdflatex.output = $${DOC_DIR}/${QMAKE_FILE_BASE}.pdf +pdflatex.input = LATEX +pdflatex.commands = mkdir -p $${DOC_DIR} && \ + pdflatex -output-directory $${DOC_DIR} ${QMAKE_FILE_NAME} && \ + pdflatex -output-directory $${DOC_DIR} ${QMAKE_FILE_NAME} +pdflatex.clean = $${DOC_DIR}/${QMAKE_FILE_BASE}.aux $${DOC_DIR}/${QMAKE_FILE_BASE}.log $${DOC_DIR}/${QMAKE_FILE_BASE}.out $${DOC_DIR}/${QMAKE_FILE_BASE}.toc $${DOC_DIR}/${QMAKE_FILE_BASE}.pdf +pdflatex.variable_out = JUNK +pdflatex.name = LATEX + +QMAKE_EXTRA_COMPILERS += pdflatex isEmpty(PREFIX) { PREFIX = $$(PREFIX) @@ -31,5 +37,5 @@ isEmpty(PREFIX) { target.path = $$PREFIX/bin documentation.path = $$PREFIX/share/doc/pokegen/pokegen-$${VERSION} documentation.files = ../doc/pokegen.pdf -documentation.extra = make doc +documentation.depends = ../doc/pokegen.pdf INSTALLS += target documentation diff --git a/pokemod/pokemod.pro b/pokemod/pokemod.pro index 01ee42e8..cf0129bb 100644 --- a/pokemod/pokemod.pro +++ b/pokemod/pokemod.pro @@ -1,3 +1,4 @@ +VERSION = 0.0.1 TEMPLATE = lib OBJECTS_DIR = .obj MOC_DIR = .moc @@ -92,10 +93,10 @@ HEADERS += AbilityEffect.h \ Type.h isEmpty(PREFIX) { - PREFIX = $$(PREFIX)/lib + PREFIX = $$(PREFIX) } isEmpty(PREFIX) { - PREFIX = /usr/lib`kde4-config --libsuffix` + PREFIX = /usr } -target.path = $$PREFIX +target.path = $$PREFIX/lib$$system(kde4-config --libsuffix) INSTALLS += target diff --git a/pokemodr/pokemodr.pro b/pokemodr/pokemodr.pro index 27fd6a64..a33d6043 100644 --- a/pokemodr/pokemodr.pro +++ b/pokemodr/pokemodr.pro @@ -1,7 +1,9 @@ +VERSION = 0.0.1 TEMPLATE = app OBJECTS_DIR = .obj UI_DIR = .ui MOC_DIR = .moc +DOC_DIR = ../doc DESTDIR = ../bin LIBS += -L../bin \ -lgeneral \ @@ -265,14 +267,20 @@ FORMS += gui/ability.ui \ gui/trainer.ui \ gui/type.ui -doc.target = doc -doc.commands = pdflatex pokemodr.tex && \ - pdflatex pokemodr.tex && \ - rm -f pokemodr.aux pokemodr.log pokemodr.out pokemodr.toc && \ - mkdir ../doc && \ - mv pokemodr.pdf ../doc/pokemodr.pdf +LATEX += pokemodr.tex -QMAKE_EXTRA_UNIX_TARGETS += doc +QMAKE_FILETAGS += LATEX + +latex.output = $${DOC_DIR}/${QMAKE_FILE_BASE}.pdf +latex.input = LATEX +latex.commands = mkdir -p $${DOC_DIR} && \ + pdflatex -output-directory $${DOC_DIR} ${QMAKE_FILE_NAME} && \ + pdflatex -output-directory $${DOC_DIR} ${QMAKE_FILE_NAME} +latex.clean = $${DOC_DIR}/${QMAKE_FILE_BASE}.aux $${DOC_DIR}/${QMAKE_FILE_BASE}.log $${DOC_DIR}/${QMAKE_FILE_BASE}.out $${DOC_DIR}/${QMAKE_FILE_BASE}.toc $${DOC_DIR}/${QMAKE_FILE_BASE}.pdf +latex.name = LaTeX +latex.CONFIG = no_dependencies no_link + +QMAKE_EXTRA_COMPILERS += latex isEmpty(PREFIX) { PREFIX = $$(PREFIX) @@ -291,6 +299,8 @@ resources.files = overlays/overlays.qrc \ overlays/water.png \ overlays/wilds.png documentation.path = $$PREFIX/share/doc/pokegen-$${VERSION} -documentation.files = ../doc/pokemodr.pdf -documentation.extra = pwd; make doc +documentation.depends = $${DOC_DIR}/pokemodr.pdf +documentation.files = $${DOC_DIR}/pokemodr.pdf +documentation.extra = -$(INSTALL_FILE) $${DOC_DIR}/pokemodr.pdf mnt/storage/programming/pc/pokegen/pokemodr/overlays/overlays.qrc $(INSTALL_ROOT)$$PREFIX/share/doc/pokegen-$${VERSION} +documentation.uninstall = -$(DEL_FILE) $(INSTALL_ROOT)$$PREFIX/share/doc/pokegen-$${VERSION}/pokemodr.pdf INSTALLS += target resources documentation |
