diff --git a/.gitignore b/.gitignore index 474db1f..c33713e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/dtv-scan-tables-2013-07-03-d913405.tar.bz2 -/dtv-scan-tables-2014-03-09-177b522.tar.bz2 -/dtv-scan-tables-2014-05-12-1246b27.tar.bz2 +# Lines starting with '#' are considered comments. +# Ignore editor backupfiles +*~ diff --git a/add_install_target.patch b/add_install_target.patch new file mode 100644 index 0000000..6d280aa --- /dev/null +++ b/add_install_target.patch @@ -0,0 +1,112 @@ +From c1cc6333f2c99ae9239d0d048080ac89439a088d Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Sat, 27 Sep 2014 10:15:50 -0300 +Subject: [PATCH] Add targets to install the files at the system + +In order to be easier to package the scan tables, add +some targets to install the files, and add the instructions +about how to use it at the README file. + +Signed-off-by: Mauro Carvalho Chehab + +diff --git a/Makefile b/Makefile +index 2fb4a8890a37..901dc9df4595 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,6 +14,7 @@ MKDIR = mkdir -p + DVBFORMATCONVERT = dvb-format-convert + + DVBV3DIRS = atsc dvb-c dvb-s dvb-t ++DVBV5DIRS = $(DVBV3DIRS) isdb-t + + DVBV3CHANNELFILES = $(foreach dir,$(DVBV3DIRS),$(wildcard $(dir)/*)) + +@@ -25,6 +26,22 @@ DVBV5OUTPUTDIR = dvbv5 + + PHONY := clean dvbv3 dvbv5 + ++ifeq ($(PREFIX),) ++PREFIX = /usr/local ++endif ++ ++ifeq ($(DATADIR),) ++DATADIR = $(PREFIX)/share ++endif ++ ++ifeq ($(DVBV5DIR),) ++DVBV5DIR = dvbv5 ++endif ++ ++ifeq ($(DVBV3DIR),) ++DVBV3DIR = dvbv3 ++endif ++ + dvbv3: + @$(foreach var,$(DVBV3DIRS), $(MKDIR) $(DVBV3OUTPUTDIR)/$(var);) + @$(foreach var,$(DVBV3CHANNELFILES), $(DVBFORMATCONVERT) $(DVBFORMATCONVERT_CHANNEL_DVBV3) $(var) $(DVBV3OUTPUTDIR)/$(var);) +@@ -34,6 +51,13 @@ dvbv5: $(DVBV3OUTPUTDIR) + @$(foreach var,$(DVBV3DIRS), $(MKDIR) $(DVBV5OUTPUTDIR)/$(var);) + @$(foreach var,$(DVBV3CHANNELFILES), $(DVBFORMATCONVERT) $(DVBFORMATCONVERT_CHANNEL_DVBV5) $(DVBV3OUTPUTDIR)/$(var) $(DVBV5OUTPUTDIR)/$(var);) + ++install: ++ @mkdir -p $(DATADIR)/$(DVBV5DIR) ++ $(foreach var,$(DVBV5DIRS), install -d -p $(DATADIR)/$(DVBV5DIR)/$(var); install -D -p -m 644 $(var)/* $(DATADIR)/$(DVBV5DIR)/$(var);) ++ ++install_v3: ++ @mkdir -p $(DATADIR)/$(DVBV3DIR) ++ $(foreach var,$(DVBV3DIRS), install -d -p $(DATADIR)/$(DVBV3DIR)/$(var); install -D -p -m 644 $(DVBV3OUTPUTDIR)/$(var)/* $(DATADIR)/$(DVBV3DIR)/$(var);) + + clean: + rm -rf $(DVBV3OUTPUTDIR)/ $(DVBV5OUTPUTDIR)/ +diff --git a/README b/README +index 87561ee599ae..f0ae695aa09b 100644 +--- a/README ++++ b/README +@@ -1,6 +1,9 @@ + All tables are now using DVBv5 format. That allows suporting all standards + available on a standard way. + ++GENERATING FILES TO THE LEGACY DVBV3 FORMAT ++=========================================== ++ + A Makefile target is provided to convert to the legacy channel format. + For it to work, you need to have v4l-utils installed (specifically, + the v4l-utils package that contains the dvbv5 utils). +@@ -36,3 +39,37 @@ Plese notice that comments are not preserved when doing the conversions. + PS.: If you're willing to submit new entries and/or corrections, please + be sure to send them at the DVBv5 format and sending them via e-mail + to linux-media@vger.kernel.org. ++ ++INSTALL ++======= ++ ++In order to install the files, use: ++ $ make install ++ ++By default, it will install the files at /usr/local/share/dvbv5. ++ ++In order to install the legacy v3 formatted files, use: ++ $ make install_v3 ++ ++Don't forget to run "make dvbv3" before running the above command, ++in order to convert the files to the legacy format. ++ ++By default, it will install the files at /usr/local/share/dvbv3. ++ ++There are a few extra parameters that could be used to define where ++the files will be stored: ++ ++ PREFIX= (default: /usr/local) ++ DATADIR= (default: $(PREFIX/share) ++ DVBV5DIR= (default: dvbv3) ++ DVBV3DIR= (default: dvbv5) ++ ++So, if it is desired to install both v3 and v5 files at a tmp file, ++under the current dir, the install command would be: ++ ++ $ make install install_v3 PREFIX=`pwd`/tmp ++ Installing dvbv5-formatted files at /home/myuser/dtv-scan-tables/tmp/share/dvbv5...done. ++ Installing dvbv3-formatted files at /home/myuser/dtv-scan-tables/tmp/share/dvbv3...done. ++ ++Please also note that install takes some time, as there are lots ++of files to be copied. diff --git a/dtv-scan-tables.spec b/dtv-scan-tables.spec index b68e221..ecf64f4 100644 --- a/dtv-scan-tables.spec +++ b/dtv-scan-tables.spec @@ -1,13 +1,15 @@ Name: dtv-scan-tables -Version: 0 -Release: 7.20140512git1246b27%{?dist} +Version: 1 +Release: 1.20140905git4aad313%{?dist} Summary: Digital TV scan tables #2013-07-19: License discussed in: https://bugzilla.redhat.com/show_bug.cgi?id=986051#c4 License: Public Domain URL: http://git.linuxtv.org/dtv-scan-tables.git -Source0: http://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-2014-05-12-1246b27.tar.bz2 +Source0: http://linuxtv.org/downloads/dtv-scan-tables/%{name}-2014-09-05-4aad313.tar.bz2 +Patch0: add_install_target.patch BuildArch: noarch +BuildRequires: v4l-utils >= 1.4.0 # FPC permission for Conflicts: # https://lists.fedoraproject.org/pipermail/packaging/2013-July/009346.html # https://fedorahosted.org/fpc/ticket/316 @@ -17,24 +19,40 @@ Conflicts: dvb-apps < 1.1.2-6.1488.f3a70b206f0f This package contains digital TV scan tables that are used by TV applications to scan for channels. +%package legacy +Summary: Digital TV scan tables at the legacy format. +License: Public Domain + +%description legacy +This package contains digital TV scan tables that are used by TV applications +to scan for channels in the legacy DVBv3 format, compatible with the old +dvb-apps. + %prep -# The data just needs to be extracted to /, therfore nothing to do here +%setup -T -c +%{__tar} xf %{SOURCE0} --transform="s,/usr/share/dvb/,," +%patch0 -p1 %build -# No build required - +make dvbv3 %install -tar --directory="$RPM_BUILD_ROOT" --file="%{SOURCE0}" --extract -mkdir -p $RPM_BUILD_ROOT/%{_pkgdocdir} -mv $RPM_BUILD_ROOT/%{_datadir}/dvb/COPYING* $RPM_BUILD_ROOT/%{_pkgdocdir} +make DATADIR=%{buildroot}/%{_datadir} install install_v3 +%{__mkdir_p} %{buildroot}/%{_pkgdocdir} +cp $RPM_SOURCE_DIR/%{name}-%{version}/COPYING* %{buildroot}/%{_pkgdocdir} + +%files legacy +%{_datadir}/dvbv3/ %files %doc %{_pkgdocdir}/COPYING %doc %{_pkgdocdir}/COPYING.LGPL -%{_datadir}/dvb/ +%{_datadir}/dvbv5 %changelog +* Sat Sep 27 2014 Mauro Carvalho Chehab - 0-8.20140905git4aad313 +- Update to latest release and create a package for the legacy format + * Sun Aug 31 2014 Till Maas - 0-7.20140512git1246b27 - Update to latest release diff --git a/sources b/sources index 671e3d7..b394c7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5f16ecf29cfaa1d86307640b9b104147 dtv-scan-tables-2014-05-12-1246b27.tar.bz2 +c6d896750369717f8651ee2a504748c7 dtv-scan-tables-2014-09-05-4aad313.tar.bz2